This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
== Fixes for msdosfs_rename VOP | ||
|
||
Contact: Konstantin Belousov <kib@FreeBSD.org> | ||
Contact: Peter Holm <pho@FreeBSD.org> | ||
|
||
Our msdosfs(5) implementation is old code, and it has a relatively | ||
large legacy cost. In particular, even though it got fine-grained | ||
locking and miscellaneous bugfixes over time, sometimes a big bug spot | ||
is found in it. | ||
|
||
Recently trasz@ found that msdosfs rename can be easily deadlocked. | ||
Further code examination revealed a lot of issues with locking, | ||
potential use after free, and filesystem structure corruption. | ||
|
||
During this work, all known issues were fixed and msdosfs passes | ||
enhanced stress2 suite of tests. | ||
|
||
In particular, locking in the msdosfs rename code was reworked: we | ||
need to lock up to four vnodes, and check one path to ensure that | ||
rename does not create cicrular parent relations between directories. | ||
For that, the locking procedure was copied from UFS rename, where all | ||
vnodes except the first are locked in try-mode. Lockless relockup was | ||
added to msdosfs and the directory path checker changed to non-blocking | ||
mode. | ||
|
||
Sponsor: The FreeBSD Foundation (kib' part of the work) |