]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Work-around READDIRPLUS problem with .zfs/ and .zfs/snapshot/ directories
authorPawel Jakub Dawidek <pjd@FreeBSD.org>
Sun, 13 Sep 2009 16:05:20 +0000 (16:05 +0000)
committerPawel Jakub Dawidek <pjd@FreeBSD.org>
Sun, 13 Sep 2009 16:05:20 +0000 (16:05 +0000)
commit7746b6461da1ec362ca496bb3998124f6e4db7f6
tree0f6831b72fc5c53b73f5949114986276fb82131d
parent4c68dee0fb9981ab0f9cac1fbb33605787c43841
Work-around READDIRPLUS problem with .zfs/ and .zfs/snapshot/ directories
by just returning EOPNOTSUPP. This will allow NFS server to fall back to
regular READDIR.

Note that converting inode number to snapshot's vnode is expensive operation.
Snapshots are stored in AVL tree, but based on their names, not inode numbers,
so to convert inode to snapshot vnode we have to interate over all snalshots.

This is not a problem in OpenSolaris, because in their READDIRPLUS
implementation they use VOP_LOOKUP() on d_name, instead of VFS_VGET() on
d_fileno as we do.

PR: kern/125149
Reported by: Weldon Godfrey <wgodfrey@ena.com>
Analysis by: Jaakko Heinonen <jh@saunalahti.fi>
MFC after: 3 days
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c