linux/fs/xfs
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
..
linux-2.6 [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
quota [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
support [XFS] Portability changes: remove prdev, stick to one diagnostic 2006-06-09 15:29:40 +10:00
Kbuild kbuild/xfs: introduce fs/xfs/Kbuild 2006-01-09 20:48:03 +01:00
Kconfig [XFS] Remove unneeded conditional code on NFS export interface related 2006-06-19 08:40:27 +10:00
Makefile [XFS] Sort out some cosmetic differences between XFS trees. 2005-09-05 11:47:01 +10:00
Makefile-linux-2.6 [XFS] Remove files from the build that are now unused. 2006-06-20 14:53:51 +10:00
xfs_acl.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_acl.h [XFS] Resolve a namespace collision on remaining vtypes for FreeBSD 2006-06-09 17:07:12 +10:00
xfs_ag.h [XFS] We really suck at spulling. Thanks to Chris Pascoe for fixing all 2006-03-29 08:55:14 +10:00
xfs_alloc_btree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_alloc_btree.h [XFS] Endianess annotations for various allocator data structures 2005-11-02 15:11:25 +11:00
xfs_alloc.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_alloc.h [XFS] In actual allocation of file system blocks and freeing extents, the 2006-06-09 14:55:18 +10:00
xfs_arch.h [XFS] Merge in trivial changes, sync up headers with userspace 2006-01-12 10:29:53 +11:00
xfs_attr_leaf.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_attr_leaf.h [XFS] endianess annotations for xfs_attr_leaf_name_remote_t 2006-03-17 17:29:18 +11:00
xfs_attr_sf.h [XFS] endianess annotations for xfs_attr_shortform_t 2006-03-17 17:29:25 +11:00
xfs_attr.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_attr.h [XFS] Resolve a namespace collision on vnode/vnodeops for FreeBSD porters. 2006-06-09 17:00:52 +10:00
xfs_behavior.c [XFS] We really suck at spulling. Thanks to Chris Pascoe for fixing all 2006-03-29 08:55:14 +10:00
xfs_behavior.h [XFS] We really suck at spulling. Thanks to Chris Pascoe for fixing all 2006-03-29 08:55:14 +10:00
xfs_bit.c [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_bit.h [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_bmap_btree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_bmap_btree.h [XFS] 929045 567344 This mod introduces multi-level in-core file extent 2006-03-14 13:30:23 +11:00
xfs_bmap.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_bmap.h [XFS] Add parameters to xfs_bmapi() and xfs_bunmapi() to have them report 2006-06-09 14:48:12 +10:00
xfs_btree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_btree.h [XFS] Endianess annotations for various allocator data structures 2005-11-02 15:11:25 +11:00
xfs_buf_item.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_buf_item.h [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_cap.h [XFS] Resolve a namespace collision on vnode/vnodeops for FreeBSD porters. 2006-06-09 17:00:52 +10:00
xfs_clnt.h [XFS] Implement the silent parameter to fill_super, previously ignored. 2006-03-31 13:04:17 +10:00
xfs_da_btree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_da_btree.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dfrag.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dfrag.h [XFS] Add parameters to xfs_bmapi() and xfs_bunmapi() to have them report 2006-06-09 14:48:12 +10:00
xfs_dinode.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_block.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_block.h [XFS] endianess annotations for xfs_dir2_block_tail_t 2006-03-17 17:27:56 +11:00
xfs_dir2_data.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_data.h [XFS] endianess annotations for xfs_dir2_data_entry_t 2006-06-09 14:48:37 +10:00
xfs_dir2_leaf.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_leaf.h [XFS] endianess annotations for xfs_dir2_leaf_entry_t 2006-03-17 17:28:18 +11:00
xfs_dir2_node.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_node.h [XFS] endianess annotations for xfs_dir2_free_hdr_t 2006-03-17 17:27:07 +11:00
xfs_dir2_sf.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_sf.h [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_dir2_trace.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_trace.h [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_dir2.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dmapi.h [XFS] Resolve a namespace collision on vfs/vfsops for FreeBSD porters. 2006-06-09 16:48:30 +10:00
xfs_dmops.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_error.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_error.h [XFS] Implement the silent parameter to fill_super, previously ignored. 2006-03-31 13:04:17 +10:00
xfs_extfree_item.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_extfree_item.h [XFS] inode items and EFI/EFDs have different ondisk format for 32bit and 2006-06-09 14:55:38 +10:00
xfs_fs.h [XFS] Add degframentation exclusion support 2006-06-09 14:54:19 +10:00
xfs_fsops.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_fsops.h [XFS] Write log dummy record when freezing filesystem 2006-01-11 15:30:08 +11:00
xfs_ialloc_btree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_ialloc_btree.h [XFS] Endianess annotations for various allocator data structures 2005-11-02 15:11:25 +11:00
xfs_ialloc.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_ialloc.h [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_iget.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_imap.h [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_inode_item.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_inode_item.h [XFS] inode items and EFI/EFDs have different ondisk format for 32bit and 2006-06-09 14:55:38 +10:00
xfs_inode.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_inode.h [XFS] Resolve a namespace collision on vnode/vnodeops for FreeBSD porters. 2006-06-09 17:00:52 +10:00
xfs_inum.h [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_iocore.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_iomap.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_iomap.h [XFS] Fix potential overflow in xfs_iomap_t delta for very large extents 2005-11-25 16:41:33 +11:00
xfs_itable.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_itable.h [XFS] Remove dead code from come bulkstat paths. 2006-06-09 15:29:22 +10:00
xfs_log_priv.h [XFS] remove XFS_LOG_RES_DEBUG and turn on the res history all the time to 2006-01-11 21:02:47 +11:00
xfs_log_recover.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_log_recover.h [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_log.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_log.h [XFS] We really suck at spulling. Thanks to Chris Pascoe for fixing all 2006-03-29 08:55:14 +10:00
xfs_mac.h [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_mount.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_mount.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_qmops.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_quota.h [XFS] Resolve a namespace collision on vfs/vfsops for FreeBSD porters. 2006-06-09 16:48:30 +10:00
xfs_refcache.h [XFS] Cleanup cosmetic differences between source trees. 2005-11-03 16:14:31 +11:00
xfs_rename.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_rtalloc.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_rtalloc.h [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_rw.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_rw.h [XFS] Push some common code out of write path into core XFS code for 2006-06-19 08:39:53 +10:00
xfs_sb.h [XFS] Sort out cosmetic differences between user and kernel copies of some 2006-01-11 15:33:02 +11:00
xfs_trans_ail.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans_buf.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans_extfree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans_inode.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans_item.c [XFS] Portability changes: remove prdev, stick to one diagnostic 2006-06-09 15:29:40 +10:00
xfs_trans_priv.h [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_trans_space.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_types.h [XFS] Update license/copyright notices to match the prefered SGI 2005-11-02 14:58:39 +11:00
xfs_utils.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_utils.h [XFS] Resolve a namespace collision on remaining vtypes for FreeBSD 2006-06-09 17:07:12 +10:00
xfs_vfsops.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_vnodeops.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs.h [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason 2005-11-09 07:55:57 -08:00