DragonFly commits List (threaded) for 2012-02
git: hammer2 kernel: mfs -- Fix unmount panic for MFS filesystems.
Author: Venkatesh Srinivas <firstname.lastname@example.org>
Date: Thu Feb 16 07:53:22 2012 -0800
kernel: mfs -- Fix unmount panic for MFS filesystems.
mfs_start() is active for the life of an MFS mount, handling copyin/out
requests. It is directed to exit when an MFS filesystem is unmounted.
The VFS accounting code and VFS MPLOCK code assumed that the mountpoint
structure was stable on return of mfs_start, which was not the case.
To work around that, don't call acinit if the vfs_start vfsop returns
EMOUNTEXIT, a kernel-specific pseudo-errno. Also allow marking vfs_start
MPSAFE and mark mfs vfs_start MPSAFE, to avoid accessing a per-mount
token field. A future commit will rework MFS's locking so that critical
sections are not used to protect the MFS bioq.
This is a hack for MFS; future work should either rework the filesystem
or replace it outright with tmpfs.
Closes: Bug 2276
Summary of changes:
sys/kern/vfs_vfsops.c | 4 +++-
sys/sys/errno.h | 1 +
sys/sys/mount.h | 4 +++-
sys/vfs/mfs/mfs_vfsops.c | 8 +++++++-
4 files changed, 14 insertions(+), 3 deletions(-)
DragonFly BSD source repository