linux-sg2042/fs/jfs
David Howells 454e2398be [PATCH] VFS: Permit filesystem to override root dentry on mount
Extend the get_sb() filesystem operation to take an extra argument that
permits the VFS to pass in the target vfsmount that defines the mountpoint.

The filesystem is then required to manually set the superblock and root dentry
pointers.  For most filesystems, this should be done with simple_set_mnt()
which will set the superblock pointer and then set the root dentry to the
superblock's s_root (as per the old default behaviour).

The get_sb() op now returns an integer as there's now no need to return the
superblock pointer.

This patch permits a superblock to be implicitly shared amongst several mount
points, such as can be done with NFS to avoid potential inode aliasing.  In
such a case, simple_set_mnt() would not be called, and instead the mnt_root
and mnt_sb would be set directly.

The patch also makes the following changes:

 (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount
     pointer argument and return an integer, so most filesystems have to change
     very little.

 (*) If one of the convenience function is not used, then get_sb() should
     normally call simple_set_mnt() to instantiate the vfsmount. This will
     always return 0, and so can be tail-called from get_sb().

 (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the
     dcache upon superblock destruction rather than shrink_dcache_anon().

     This is required because the superblock may now have multiple trees that
     aren't actually bound to s_root, but that still need to be cleaned up. The
     currently called functions assume that the whole tree is rooted at s_root,
     and that anonymous dentries are not the roots of trees which results in
     dentries being left unculled.

     However, with the way NFS superblock sharing are currently set to be
     implemented, these assumptions are violated: the root of the filesystem is
     simply a dummy dentry and inode (the real inode for '/' may well be
     inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries
     with child trees.

     [*] Anonymous until discovered from another tree.

 (*) The documentation has been adjusted, including the additional bit of
     changing ext2_* into foo_* in the documentation.

[akpm@osdl.org: convert ipath_fs, do other stuff]
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Nathan Scott <nathans@sgi.com>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23 07:42:45 -07:00
..
Makefile JFS: ext2 inode attributes for jfs 2006-02-09 09:09:16 -06:00
acl.c JFS: add uid, gid, and umask mount options 2006-03-09 13:59:30 -06:00
endian24.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
file.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
inode.c [PATCH] remove ->get_blocks() support 2006-03-26 08:57:01 -08:00
ioctl.c JFS: Add missing file from fa3241d24c 2006-02-22 14:14:58 -06:00
jfs_acl.h JFS: allow extended attributes to be set within a existing transaction 2005-09-01 09:02:43 -05:00
jfs_btree.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_debug.c [PATCH] fs: Use ARRAY_SIZE macro 2006-03-24 07:33:19 -08:00
jfs_debug.h JFS: fix sparse warnings by moving extern declarations to headers 2005-05-04 15:29:35 -05:00
jfs_dinode.h JFS: ext2 inode attributes for jfs 2006-02-09 09:09:16 -06:00
jfs_dmap.c JFS: Take logsync lock before testing mp->lsn 2006-03-08 10:59:15 -06:00
jfs_dmap.h JFS: semaphore to mutex conversion. 2006-01-24 15:22:50 -06:00
jfs_dtree.c JFS: Add back directory i_size calculations for legacy partitions 2005-11-10 07:50:03 -06:00
jfs_dtree.h JFS: Code cleanup - getting rid of never-used debug code 2005-06-27 15:35:37 -05:00
jfs_extent.c JFS: semaphore to mutex conversion. 2006-01-24 15:22:50 -06:00
jfs_extent.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_filsys.h [PATCH] disk quotas fail when /etc/mtab is symlinked to /proc/mounts 2005-09-07 16:57:23 -07:00
jfs_imap.c JFS: add uid, gid, and umask mount options 2006-03-09 13:59:30 -06:00
jfs_imap.h JFS: semaphore to mutex conversion. 2006-01-24 15:22:50 -06:00
jfs_incore.h JFS: add uid, gid, and umask mount options 2006-03-09 13:59:30 -06:00
jfs_inode.c JFS: add uid, gid, and umask mount options 2006-03-09 13:59:30 -06:00
jfs_inode.h [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
jfs_lock.h JFS: semaphore to mutex conversion. 2006-01-24 15:22:50 -06:00
jfs_logmgr.c [PATCH] sem2mutex: fs/ 2006-03-26 08:56:55 -08:00
jfs_logmgr.h JFS: semaphore to mutex conversion. 2006-01-24 15:22:50 -06:00
jfs_metapage.c JFS: Fix multiple errors in metapage_releasepage 2006-05-24 07:43:38 -05:00
jfs_metapage.h JFS: fix sparse warnings by moving extern declarations to headers 2005-05-04 15:29:35 -05:00
jfs_mount.c [PATCH] JFS: Support page sizes greater than 4K 2005-05-02 22:23:53 -07:00
jfs_superblock.h JFS: Use the kthread_ API 2006-02-15 12:49:04 -06:00
jfs_txnmgr.c JFS: Use the kthread_ API 2006-02-15 12:49:04 -06:00
jfs_txnmgr.h JFS: don't dereference tlck->ip from txUpdateMap 2005-09-20 14:58:11 -05:00
jfs_types.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_umount.c [PATCH] Fix and add EXPORT_SYMBOL(filemap_write_and_wait) 2006-01-08 20:13:47 -08:00
jfs_unicode.c JFS: performance patch 2005-06-23 16:57:56 -05:00
jfs_unicode.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_uniupr.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_xattr.h JFS: Implement jfs_init_security 2005-09-01 09:05:39 -05:00
jfs_xtree.c JFS: make sure right-most xtree pages have header.next set to zero 2005-10-28 13:27:40 -05:00
jfs_xtree.h JFS: Code cleanup - getting rid of never-used debug code 2005-06-27 15:35:37 -05:00
namei.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
resize.c [PATCH] Fix and add EXPORT_SYMBOL(filemap_write_and_wait) 2006-01-08 20:13:47 -08:00
super.c [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
symlink.c [PATCH] Fix up symlink function pointers 2005-08-19 18:08:21 -07:00
xattr.c JFS: semaphore to mutex conversion. 2006-01-24 15:22:50 -06:00