]> git.proxmox.com Git - mirror_zfs-debian.git/commit - module/zfs/zfs_znode.c
Use zfs_mknode() to create dataset root
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 20 Jul 2011 23:50:22 +0000 (16:50 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 21 Jul 2011 02:52:26 +0000 (19:52 -0700)
commit22872ff5da0d12fe393e40d3e4b3c5a58d93e360
treeb7a402d5588a747f58c0b68623dae7b43bfa921e
parent9fd91daeef4df4e2bc66f54bb97c88225c6dd2c7
Use zfs_mknode() to create dataset root

Long, long, long ago when the effort to port ZFS was begun
the zfs_create_fs() function was heavily modified to remove
all of its VFS dependencies.  This allowed Lustre to use
the dataset without us having to spend the time porting all
the required VFS code.

Fast-forward several years and we now have all the VFS code
in place but are still relying on the modified zfs_create_fs().
This isn't required anymore and we can now use zfs_mknode()
to create the root znode for the filesystem.

This commit reverts the contents of zfs_create_fs() to largely
match the upstream OpenSolaris code.  There have been minor
modifications to accomidate the Linux VFS but that is all.

This code fixes issue #116 by bootstraping enough of the VFS
data structures so we can rely on zfs_mknode() to create the
root directory.  This ensures it is created properly with
support for system attributes.  Previously it wasn't which
is why it behaved differently that all other directories
when modified.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #116
module/zfs/zfs_znode.c