aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/autofs/automount.c
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2021-09-18 23:51:07 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2021-09-19 00:02:30 +0000
commitd7770a5495b19a987dddc77cabcdeadf18413b4d (patch)
treeb42054e80e343b0a8db99ddebeffd59233cabc63 /usr.sbin/autofs/automount.c
parentad6dc365202390edffb14d725155e230b96f59ae (diff)
downloadsrc-main.tar.gz
src-main.zip
Eliminate snaplk / bufwait LOR when creating UFS snapshotsHEADmain
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 creating a new UFS snapshot, it has to have its individual vnode lock replaced with the filesystem's snapshot lock. The lock order for regular vnodes with respect to buffer locks is that they must first acquire the vnode lock, then a buffer lock. The order for the snapshot lock is reversed: a buffer lock must be acquired before the snapshot lock. When creating a new snapshot, the snapshot file must retain its vnode lock until it has allocated all the blocks that it needs before switching to the snapshot lock. This update moves one final piece of the initial snapshot block allocation so that it is done before the newly created snapshot is switched to use the snapshot lock. Reported by: Witness code MFC after: 1 week Sponsored by: Netflix
Diffstat (limited to 'usr.sbin/autofs/automount.c')
0 files changed, 0 insertions, 0 deletions