]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/zfs_vfsops.c
Linux compat 2.6.39: mount_nodev()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 19 May 2011 18:44:07 +0000 (11:44 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 1 Jul 2011 20:36:39 +0000 (13:36 -0700)
commit2cf7f52bc42f215d4ef27d0fd75fc1b1417cb841
tree3b30ae22546bd09968cff08c7a41bb9e791ea91d
parent5c03efc379693f992ebe39c6a00c7297c4a304ea
Linux compat 2.6.39: mount_nodev()

The .get_sb callback has been replaced by a .mount callback
in the file_system_type structure.  When using the new
interface the caller must now use the mount_nodev() helper.

Unfortunately, the new interface no longer passes the vfsmount
down to the zfs layers.  This poses a problem for the existing
implementation because we currently save this pointer in the
super block for latter use.  It provides our only entry point
in to the namespace layer for manipulating certain mount options.

This needed to be done originally to allow commands like
'zfs set atime=off tank' to work properly.  It also allowed me
to keep more of the original Solaris code unmodified.  Under
Solaris there is a 1-to-1 mapping between a mount point and a
file system so this is a fairly natural thing to do.  However,
under Linux they many be multiple entries in the namespace
which reference the same filesystem.  Thus keeping a back
reference from the filesystem to the namespace is complicated.

Rather than introduce some ugly hack to get the vfsmount and
continue as before.  I'm leveraging this API change to update
the ZFS code to do things in a more natural way for Linux.
This has the upside that is resolves the compatibility issue
for the long term and fixes several other minor bugs which
have been reported.

This commit updates the code to remove this vfsmount back
reference entirely.  All modifications to filesystem mount
options are now passed in to the kernel via a '-o remount'.
This is the expected Linux mechanism and allows the namespace
to properly handle any options which apply to it before passing
them on to the file system itself.

Aside from fixing the compatibility issue, removing the
vfsmount has had the benefit of simplifying the code.  This
change which fairly involved has turned out nicely.

Closes #246
Closes #217
Closes #187
Closes #248
Closes #231
73 files changed:
Makefile.in
cmd/Makefile.in
cmd/mount_zfs/Makefile.in
cmd/mount_zfs/mount_zfs.c
cmd/sas_switch_id/Makefile.in
cmd/zdb/Makefile.in
cmd/zfs/Makefile.in
cmd/zinject/Makefile.in
cmd/zpios/Makefile.in
cmd/zpool/Makefile.in
cmd/zpool_id/Makefile.in
cmd/zpool_layout/Makefile.in
cmd/ztest/Makefile.in
cmd/zvol_id/Makefile.in
config/kernel-mount-nodev.m4 [new file with mode: 0644]
config/kernel.m4
configure
dracut/90zfs/Makefile.in
dracut/Makefile.in
etc/Makefile.in
etc/init.d/Makefile.in
etc/udev/Makefile.in
etc/udev/rules.d/Makefile.in
etc/zfs/Makefile.in
include/Makefile.in
include/libzfs.h
include/linux/Makefile.in
include/sys/Makefile.in
include/sys/fm/Makefile.in
include/sys/fm/fs/Makefile.in
include/sys/fs/Makefile.in
include/sys/zfs_vfsops.h
include/sys/zfs_znode.h
include/sys/zpl.h
lib/Makefile.in
lib/libavl/Makefile.in
lib/libefi/Makefile.in
lib/libnvpair/Makefile.in
lib/libspl/Makefile.in
lib/libspl/asm-generic/Makefile.in
lib/libspl/asm-i386/Makefile.in
lib/libspl/asm-x86_64/Makefile.in
lib/libspl/include/Makefile.in
lib/libspl/include/ia32/Makefile.in
lib/libspl/include/ia32/sys/Makefile.in
lib/libspl/include/rpc/Makefile.in
lib/libspl/include/sys/Makefile.in
lib/libspl/include/sys/dktp/Makefile.in
lib/libspl/include/sys/mntent.h
lib/libspl/include/sys/sysevent/Makefile.in
lib/libspl/include/util/Makefile.in
lib/libunicode/Makefile.in
lib/libuutil/Makefile.in
lib/libzfs/Makefile.in
lib/libzfs/libzfs_dataset.c
lib/libzfs/libzfs_mount.c
lib/libzpool/Makefile.in
man/Makefile.in
man/man8/Makefile.in
module/zfs/zfs_acl.c
module/zfs/zfs_dir.c
module/zfs/zfs_ioctl.c
module/zfs/zfs_vfsops.c
module/zfs/zfs_vnops.c
module/zfs/zpl_export.c
module/zfs/zpl_super.c
module/zfs/zpl_xattr.c
scripts/Makefile.in
scripts/zpios-profile/Makefile.in
scripts/zpios-test/Makefile.in
scripts/zpool-config/Makefile.in
scripts/zpool-layout/Makefile.in
zfs_config.h.in