Hi, Since almost all operations in the FUSE low-level API identify files by inode number, I've been using zfs_zget() to get the corresponding znode/vnode in order to call the corresponding VFS function in zfs_vnops.c.
However, there are some cases when zfs_zget() behaves slightly different than I need: 1) If zp->z_unlinked != 0 then zfs_zget() returns ENOENT. I need it to return the znode anyway, otherwise an open() followed by an unlink() followed by an fstat() would return ENOENT. 2) In the end of zfs_zget(), if the requested object number is not found, it allocates a new znode with that object number. This shouldn't happen in any FUSE operation. So, in order to overcome these problems, I refactored zfs_zget into zfs_zget_common with one added flag parameter, in order to keep the same zfs_zget interface. Is there any chance to apply the attached patch (or something similar) to the OpenSolaris ZFS codebase? Thanks. Regards, Ricardo Correia -------------- next part -------------- A non-text attachment was scrubbed... Name: zfs_zget.patch Type: text/x-diff Size: 2427 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-code/attachments/20070509/8504fed3/attachment.bin>