dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers
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
..
acorn
acpi Make sure to re-enable SCI after an ACPI suspend 2006-06-19 18:05:09 -07:00
amba
atm [SPARC]: Kill __irq_itoa(). 2006-06-20 01:21:29 -07:00
base [PATCH] Driver core: fix locking issues with the devices that are attached to classes 2006-06-22 22:54:30 -07:00
block Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
bluetooth [PATCH] pcmcia: use bitfield instead of p_state and state 2006-03-31 17:26:33 +02:00
cdrom Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
char Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
connector [CONNECTOR]: Initialize subsystem earlier. 2006-06-19 23:42:53 -07:00
cpufreq [CPUFREQ] Fix ondemand vs suspend deadlock 2006-06-21 18:30:26 -04:00
crypto
dio
dma [I/OAT]: Do not use for_each_cpu(). 2006-06-17 21:25:58 -07:00
edac [PATCH] EDAC Coexistence with BIOS 2006-05-03 20:05:41 -07:00
eisa [PATCH] EISA: Ignore generated file drivers/eisa/devlist.h 2006-03-25 08:23:01 -08:00
fc4 [SPARC]: Kill __irq_itoa(). 2006-06-20 01:21:29 -07:00
firmware [PATCH] DMI: move dmi_scan.c from arch/i386 to drivers/firmware/ 2006-04-14 11:41:25 -07:00
hwmon [PATCH] hwmon-vid: Add support for Intel Core and Conroe 2006-06-22 11:10:36 -07:00
i2c Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
ide [PATCH] Fix cdrom being confused on using kdump 2006-06-23 07:42:44 -07:00
ieee1394 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bcollins/linux1394-2.6 2006-06-20 20:01:16 -07:00
infiniband [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
input Input: psmouse - DMI updates for lifebook protocol 2006-05-29 23:31:12 -04:00
isdn [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
leds [ARM] 3563/1: LED: Set the LOCOMO LED driver default triggers 2006-06-19 13:08:39 +01:00
macintosh powerpc: add context.vdso_base for 32-bit too 2006-06-11 14:15:17 +10:00
mca
md [PATCH] md: Fix badness in sysfs_notify caused by md_new_event 2006-05-31 16:27:11 -07:00
media [PATCH] USB: move <linux/usb_input.h> to <linux/usb/input.h> 2006-06-21 15:04:18 -07:00
message Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2006-06-21 11:18:25 -07:00
mfd
misc [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
mmc [ARM] 3565/1: AT91RM9200 MMC update 2006-06-19 13:06:05 +01:00
mtd [MTD] NAND: Fix breakage all over the place 2006-06-20 20:31:24 +01:00
net Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2006-06-22 22:15:09 -07:00
nubus
oprofile [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
parisc [PARISC] Document that we tolerate "Relaxed Ordering" 2006-04-21 22:20:33 +00:00
parport [SERIAL] PARPORT_SERIAL should depend on SERIAL_8250_PCI 2006-06-18 13:00:48 +01:00
pci [PATCH] PCI: nVidia quirk to make AER PCI-E extended capability visible 2006-06-21 12:00:01 -07:00
pcmcia [ARM] Fix badge4 build error 2006-06-19 15:37:31 +01:00
pnp [PATCH] pnp: fix two messages in manager.c 2006-04-19 09:13:52 -07:00
rapidio
rtc [PATCH] m48t86: ia64 build fix 2006-06-05 12:29:17 -07:00
s390 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2006-06-21 11:18:25 -07:00
sbus [SPARC]: Kill __irq_itoa(). 2006-06-20 01:21:29 -07:00
scsi [PATCH] PCI: Move various PCI IDs to header file 2006-06-21 12:00:00 -07:00
serial Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2006-06-22 22:46:28 -07:00
sh
sn [PATCH] Altix: correct ioc4 port order 2006-05-03 20:05:41 -07:00
spi [PATCH] s3c24xx: fix spi driver with CONFIG_PM 2006-05-26 11:55:46 -07:00
tc
telephony [PATCH] pcmcia: use bitfield instead of p_state and state 2006-03-31 17:26:33 +02:00
usb [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
video [PATCH] vgacon: make VGA_MAP_MEM take size, remove extra use 2006-06-22 15:05:58 -07:00
w1 [PATCH] w1: warning fix 2006-06-22 11:22:51 -07:00
zorro
Kconfig [I/OAT]: DMA memcpy subsystem 2006-06-17 21:18:43 -07:00
Makefile [I/OAT]: DMA memcpy subsystem 2006-06-17 21:18:43 -07:00