Page MenuHomeFreeBSD

Add a "bgnow" NFS mount option that causes the mount to go background immediately
ClosedPublic

Authored by rmacklem on Jan 3 2022, 10:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 9, 12:54 AM
Unknown Object (File)
Sun, Apr 7, 12:30 AM
Unknown Object (File)
Mar 11 2024, 11:57 PM
Unknown Object (File)
Mar 11 2024, 11:57 PM
Unknown Object (File)
Mar 11 2024, 11:57 PM
Unknown Object (File)
Mar 8 2024, 4:07 AM
Unknown Object (File)
Jan 14 2024, 6:26 AM
Unknown Object (File)
Jan 13 2024, 8:57 PM

Details

Summary

The "bg" option does not go background until the initial mount
attempt fails, which can take 60+ seconds.

This option goes background immediately, avoiding the 60+
second delay, if the NFS server is not yet available.

Test Plan

Tested on a NFS mount to the same system done via
/etc/fstab. Since the NFS server starts after "mount -a"
during booting, the boot would hang without either
"bg" or "bgnow" and delay 60+ seconds for "bg".

Also tested by the person who requested this feature.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Manual page change looks good to me and consistent with the spec in the commit message. Can't speak beyond that.

debdrup added a subscriber: debdrup.

mdoc formatting looks good to me too, but maybe someone else wants to chime in on the code?

This revision is now accepted and ready to land.Jan 4 2022, 11:58 AM

Only thing I would change is use a consistent format for the bit masks: E.g. 0x04, 0x08, 0x10.

In D33733#764509, @jwb wrote:

Only thing I would change is use a consistent format for the bit masks: E.g. 0x04, 0x08, 0x10.

Fair point, with the different indentation and format it's not immediately clear that these are a set of bits.

LGTM with that and the one other comment

sbin/mount_nfs/mount_nfs.c
429

Maybe add "are" -- are mutually exclusive?
I know errors are not necessarily full sentences but this one is already quite close

This revision was automatically updated to reflect the committed changes.