Page MenuHomeFreeBSD

Wait for root mount hold release in etc/rc.d/fsck.
ClosedPublic

Authored by trasz on May 5 2016, 11:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 11:10 PM
Unknown Object (File)
Thu, Dec 19, 10:57 PM
Unknown Object (File)
Thu, Dec 19, 5:16 PM
Unknown Object (File)
Nov 26 2024, 2:01 AM
Unknown Object (File)
Nov 24 2024, 12:48 AM
Unknown Object (File)
Nov 23 2024, 9:41 AM
Unknown Object (File)
Nov 23 2024, 8:43 AM
Unknown Object (File)
Nov 22 2024, 2:25 PM
Subscribers

Details

Summary

Refactor the root mount hold code and add the wait to etc/rc.d/fsck.
This fixes mounting (non-root) USB drives on boot with fsck enabled
(with non-zero 'Pass#' field in fstab(5).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3597
Build 3637: arc lint + arc unit

Event Timeline

trasz retitled this revision from to Wait for root mount hold release in etc/rc.d/fsck..
trasz updated this object.
trasz edited the test plan for this revision. (Show Details)

In rare situations, this might cause 2 times a root_hold_delay: if devices that need fsck appear later and other devices for mountcritlocal appear even later. I suppose it is not a major issue. Fixing it would probably require giving up the separation of fsck and mountcritlocal.

etc/rc.subr
1962

This comment needs to be updated for its new location. "This script" can be mountcritlocal or fsck now. The last sentence likewise needs adjustment.

Hm, it shouldn't work that way - releasing the root mount hold happens only once; plugging eg an USB disk doesn't affect it. Also, the root_hold_delay is "just in case" - if something hits the timeout, it probably means trouble at the kernel level.

trasz edited edge metadata.

Update the comment.

jilles edited edge metadata.
This revision is now accepted and ready to land.May 6 2016, 12:26 PM
This revision was automatically updated to reflect the committed changes.