NetBSD/sys/fs
ad 42d0626726 PR kern/38141 lookup/vfs_busy acquire rwlock recursively
Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.

Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:

- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
  sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
  and is only ever write locked in dounmount(). A write hold can't be taken
  on this lock if the current LWP could hold a vnode lock.

- kmutex_t mnt_updating. This is taken by threads updating the mount, for
  example when going r/o -> r/w, and is only present to serialize updates.
  In order to take this lock, a read hold must first be taken on
  mnt_unmounting, and the two need to be held across the operation.

One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.
2008-05-06 18:43:44 +00:00
..
adosfs PR kern/38057 ffs makes assuptions about devvp file system 2008-04-29 18:18:08 +00:00
cd9660 PR kern/38141 lookup/vfs_busy acquire rwlock recursively 2008-05-06 18:43:44 +00:00
efs - Convert hashinit() to use kmem_alloc(). The hash tables can be large 2008-05-05 17:11:16 +00:00
filecorefs PR kern/38141 lookup/vfs_busy acquire rwlock recursively 2008-05-06 18:43:44 +00:00
hfs - Convert hashinit() to use kmem_alloc(). The hash tables can be large 2008-05-05 17:11:16 +00:00
msdosfs PR kern/38141 lookup/vfs_busy acquire rwlock recursively 2008-05-06 18:43:44 +00:00
ntfs PR kern/38141 lookup/vfs_busy acquire rwlock recursively 2008-05-06 18:43:44 +00:00
ptyfs - Convert hashinit() to use kmem_alloc(). The hash tables can be large 2008-05-05 17:11:16 +00:00
puffs PR kern/38141 lookup/vfs_busy acquire rwlock recursively 2008-05-06 18:43:44 +00:00
smbfs - Convert hashinit() to use kmem_alloc(). The hash tables can be large 2008-05-05 17:11:16 +00:00
sysvbfs Make various bits of debug code compile again. 2008-04-30 14:07:13 +00:00
tmpfs PR kern/38057 ffs makes assuptions about devvp file system 2008-04-29 18:18:08 +00:00
udf PR kern/38057 ffs makes assuptions about devvp file system 2008-04-29 18:18:08 +00:00
union PR kern/38141 lookup/vfs_busy acquire rwlock recursively 2008-05-06 18:43:44 +00:00
unionfs PR kern/38057 ffs makes assuptions about devvp file system 2008-04-29 18:18:08 +00:00
Makefile Add read-only support for SGI's Extent File System. 2007-06-29 23:30:16 +00:00
unicode.h Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00