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.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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
428

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.