linux/fs/ntfs
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
..
ChangeLog NTFS: Semaphore to mutex conversion. 2006-03-23 16:57:48 +00:00
Makefile NTFS: Fix an (innocent) off-by-one error in the runlist code. 2006-03-23 14:57:43 +00:00
aops.c NTFS: Semaphore to mutex conversion. 2006-03-23 16:57:48 +00:00
aops.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
attrib.c NTFS: Remove all the make_bad_inode() calls. This should only be called 2006-03-23 15:59:32 +00:00
attrib.h NTFS: Add fs/ntfs/attrib.[hc]::ntfs_attr_extend_allocation(), a function to 2005-10-04 15:18:56 +01:00
bitmap.c NTFS: Fix a stupid bug in __ntfs_bitmap_set_bits_in_run() which caused the 2005-10-04 13:06:00 +01:00
bitmap.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
collate.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
collate.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
compress.c NTFS: Semaphore to mutex conversion. 2006-03-23 16:57:48 +00:00
debug.c NTFS: Fix printk format warnings on ia64. (Randy Dunlap) 2005-05-05 11:11:47 +01:00
debug.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dir.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
dir.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
endian.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
file.c [PATCH] NTFS: Critical bug fix (affects MIPS and possibly others) 2006-06-22 15:05:55 -07:00
index.c [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
index.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
inode.c NTFS: Semaphore to mutex conversion. 2006-03-23 16:57:48 +00:00
inode.h NTFS: Semaphore to mutex conversion. 2006-03-23 16:57:48 +00:00
layout.h NTFS: Improve comments on file attribute flags in fs/ntfs/layout.h. 2006-03-23 16:09:40 +00:00
lcnalloc.c NTFS: - Change ntfs_cluster_alloc() to take an extra boolean parameter 2005-10-04 14:36:56 +01:00
lcnalloc.h NTFS: - Change ntfs_cluster_alloc() to take an extra boolean parameter 2005-10-04 14:36:56 +01:00
logfile.c [PATCH] bitops: ntfs: remove generic_ffs() 2006-03-26 08:57:15 -08:00
logfile.h NTFS: Fix sparse warnings that have crept in over time. 2005-09-22 13:26:44 +01:00
malloc.h NTFS: In attrib.c::ntfs_attr_set() call balance_dirty_pages_ratelimited() 2005-10-11 14:54:42 +01:00
mft.c [PATCH] bitops: ntfs: remove generic_ffs() 2006-03-26 08:57:15 -08:00
mft.h NTFS: Remove all the make_bad_inode() calls. This should only be called 2006-03-23 15:59:32 +00:00
mst.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
namei.c NTFS: Handle the recently introduced -ENAMETOOLONG return value from 2006-03-23 16:25:23 +00:00
ntfs.h [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
quota.c [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
quota.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
runlist.c NTFS: Fix an (innocent) off-by-one error in the runlist code. 2006-03-23 14:57:43 +00:00
runlist.h NTFS: Add ntfs_rl_punch_nolock() which punches a caller specified hole into a runlist. 2005-09-08 20:26:34 +01:00
super.c [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
sysctl.c NTFS: - Add disable_sparse mount option together with a per volume sparse 2005-05-05 10:53:01 +01:00
sysctl.h [PATCH] turn many #if $undefined_string into #ifdef $undefined_string 2005-07-27 16:26:08 -07:00
time.h NTFS: Change time to u64 in time.h::ntfs2utc() as it otherwise generates a 2005-05-05 11:01:13 +01:00
types.h NTFS: Stamp the transaction log ($UsnJrnl), aka user space journal, if it 2005-06-25 15:28:56 +01:00
unistr.c NTFS: Limit name length in fs/ntfs/unistr.c::ntfs_nlstoucs() to maximum 2006-03-23 16:05:11 +00:00
upcase.c NTFS: Do more detailed reporting of why we cannot mount read-write by 2006-02-24 10:48:14 +00:00
usnjrnl.c NTFS: Stamp the transaction log ($UsnJrnl), aka user space journal, if it 2005-06-25 15:28:56 +01:00
usnjrnl.h NTFS: Stamp the transaction log ($UsnJrnl), aka user space journal, if it 2005-06-25 15:28:56 +01:00
volume.h NTFS: Do more detailed reporting of why we cannot mount read-write by 2006-02-24 10:48:14 +00:00