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)
May 15 2024, 3:47 PM
Unknown Object (File)
May 9 2024, 7:12 AM
Unknown Object (File)
May 9 2024, 7:10 AM
Unknown Object (File)
May 9 2024, 7:10 AM
Unknown Object (File)
May 9 2024, 7:10 AM
Unknown Object (File)
May 8 2024, 8:18 PM
Unknown Object (File)
Apr 26 2024, 12:58 AM
Unknown Object (File)
Apr 26 2024, 12:58 AM
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 Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #15925)

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.