freebsd-src/sys/ufs/ffs
Kirk McKusick 79a5c790bd Eliminate a locking panic when cleaning up UFS snapshots after a
disk failure.

Each vnode has an embedded lock that controls access to its contents.
However vnodes describing a UFS snapshot all share a single snapshot
lock to coordinate their access and update. As part of mounting a
UFS filesystem with snapshots, each of the vnodes describing a
snapshot has its individual lock replaced with the snapshot lock.
When the filesystem is unmounted the vnode's original lock is
returned replacing the snapshot lock.

When a disk fails while the UFS filesystem it contains is still
mounted (for example when a thumb drive is removed) UFS forcibly
unmounts the filesystem. The loss of the drive causes the GEOM
subsystem to orphan the provider, but the consumer remains until
the filesystem has finished with the unmount. Information describing
the snapshot locks was being prematurely cleared during the orphaning
causing the return of the snapshot vnode's original locks to fail.
The fix is to not clear the needed information prematurely.

Sponsored by: Netflix
2021-01-15 16:36:42 -08:00
..
ffs_alloc.c Convert remaining cap_rights_init users to cap_rights_init_one 2021-01-12 13:16:10 +00:00
ffs_balloc.c ffs: do not read full direct blocks if they are going to be overwritten. 2020-11-30 17:03:26 +00:00
ffs_extern.h Handle LoR in flush_pagedep_deps(). 2020-11-14 05:30:10 +00:00
ffs_inode.c Handle LoR in flush_pagedep_deps(). 2020-11-14 05:30:10 +00:00
ffs_rawread.c vmapbuf: don't smuggle address or length in buf 2020-10-21 16:00:15 +00:00
ffs_snapshot.c Eliminate lock order reversal in UFS when unmounting filesystems 2021-01-15 16:03:01 -08:00
ffs_softdep.c ffs: quiet -Wstrict-prototypes 2020-12-11 22:51:57 +00:00
ffs_subr.c Various new check-hash checks have been added to the UFS filesystem 2020-10-25 00:43:48 +00:00
ffs_suspend.c Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
ffs_tables.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ffs_vfsops.c Eliminate a locking panic when cleaning up UFS snapshots after a 2021-01-15 16:36:42 -08:00
ffs_vnops.c ffs: Support O_DSYNC. 2021-01-08 13:15:56 +13:00
fs.h Various new check-hash checks have been added to the UFS filesystem 2020-10-25 00:43:48 +00:00
softdep.h This commit enables a UFS filesystem to do a forcible unmount when 2020-05-25 23:47:31 +00:00