VFS: Integrate zfs_znode_alloc()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 5 Jan 2011 21:16:12 +0000 (13:16 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 10 Feb 2011 17:27:20 +0000 (09:27 -0800)
commit7304b6e50f656fbf4b126a4e94deac174133851c
tree9e7b6d9c0262c934c3c3e676d10bc7a20e24d9d6
parent10c6047ea56445a87d8ce1397ac2d2caa97719ca
VFS: Integrate zfs_znode_alloc()

Under Linux the convention for filesystem specific data structure is
to embed it along with the generic vfs data structure.  This differs
significantly from Solaris.

Since we want to integrates as cleanly with the Linux VFS as possible.
This changes modifies zfs_znode_alloc() to allocate a znode with an
embedded inode for use with the generic VFS.  This is done by calling
iget_locked() which will allocate a new inode if needed by calling
sb->alloc_inode().  This function allocates enough memory for a
znode_t by returns a pointer to the inode structure for Linux's VFS.
This function is also responsible for setting the callback
znode->z_set_ops_inodes() which is used to register the correct
handlers for the inode.
include/sys/zfs_znode.h
module/zfs/zfs_znode.c