Date: Fri, 13 Dec 2013 19:57:05 -0500 (EST) From: Rick Macklem <rmacklem@uoguelph.ca> To: FreeBSD Filesystems <freebsd-fs@freebsd.org> Cc: Steve Dickson <steved@redhat.com> Subject: Does zfs_vget() work for snapshot files? Message-ID: <1972597003.30638311.1386982625256.JavaMail.root@uoguelph.ca>
next in thread | raw e-mail | index | archive | help
Jason sent me a packet capture for an NFSv4 readdir of a .zfs/snapshot directory and the attributes for the snapshot entries in the directory appear like they may be bogus. They have a file type==VREG and the same fsid as .zfs/snapshot. (If the client does a lookup of the snapshot, the attributes of it come back as VDIR, fileno==4 and a different fsid than .zfs/snapshot.) There is code in zfs_vget() that makes readdir to switch to using VOP_LOOKUP() when the entry in the directory is a snapshot directory, but this doesn't appear to happen for the snapshots in a snapshot directory. (I am wondering if VFS_VGET() somehow gets a bogus vnode?) Also, does anyone know if the snapshots appear to be separate file systems with v_mountedhere set? (They do appear to have different fsid values, which implies a separate file system.) If not, I may be able to do a "workaround" by comparing the fsid of the directory being read with the fsid of the entry, instead of depending on v_mountedhere being non-NULL to indicate a different file system. Thanks in advance for any help with this, rick
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1972597003.30638311.1386982625256.JavaMail.root>