A second nullfs of the same directory deadlocks. A regular file or a
socket may be mounted again, so a read-write mount of one object can
sit on a read-only nullfs of that same object.
MFC after: 2 weeks
Differential D62023
nullfs: Allow a file or socket to be mounted again Authored by dteske on Tue, Nov 24, 10:26 PM. Project Tags None Referenced Files
Details
Diff Detail
Event TimelineComment Actions Thank you for splitting the revision up. Regarding the specific changes here, the comments and commit message read like they are slop. Are these your own words? I find "A second nullfs of the same directory deadlocks" particularly odd; is this an existing bug that needs fixing, a bug introduced in this code, or a reason why directories cannot be permitted here? I like to believe that written in your own words this text would not have such ambiguity and an odd use of tense. Comment Actions Is this related to the iocage issue? If so, based on the description, it feels like unionfs might be best suited to the task that they're trying to achieve instead of having a R/W nullfs mount mounted over a R/O mount.
Comment Actions You're welcome.
The third. Not a bug, and nothing this diff introduces. Directories cannot be permitted here because the covered vnode and the new root share one lock, and a lookup needs those to be two locks. The mount does not "deadlock" per se, but nullfs_mount() returns EDEADLK. Making a file or a socket the exception is possible because a lookup inside a file or socket does not lock a second vnode, and is required so we can allow that one object to be mounted again with different options.
Agreed on the tense. "Deadlocks" reads as what the mount does. I can change that sentence to "A second nullfs of the same directory returns EDEADLK" if you think that reads better. | |||||||||||||||||||||||||||||||||||