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)
Tue, Nov 26, 2:01 AM
Unknown Object (File)
Sun, Nov 24, 12:48 AM
Unknown Object (File)
Sat, Nov 23, 9:41 AM
Unknown Object (File)
Sat, Nov 23, 8:43 AM
Unknown Object (File)
Fri, Nov 22, 2:25 PM
Unknown Object (File)
Fri, Nov 22, 12:25 PM
Unknown Object (File)
Nov 17 2024, 9:35 PM
Unknown Object (File)
Nov 17 2024, 6:16 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 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.