Page MenuHomeFreeBSD

nfs: patch up MNT_LAZY on sync
ClosedPublic

Authored by mjg on Feb 24 2023, 7:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 20, 2:42 PM
Unknown Object (File)
Mar 13 2024, 9:05 PM
Unknown Object (File)
Jan 12 2024, 11:36 PM
Unknown Object (File)
Dec 20 2023, 8:32 AM
Unknown Object (File)
Dec 1 2023, 11:00 AM
Unknown Object (File)
Oct 29 2023, 1:54 PM
Unknown Object (File)
Sep 28 2023, 7:05 AM
Unknown Object (File)
Sep 13 2023, 10:03 PM
Subscribers

Details

Summary

It is a de facto noop, just make it less costly.

quite frankly the code looks like a bug. did you mean to do LK_NOWAIT locking in this case instead?

if the doing nothing is indeed intended, this patch accomplishes it cheaper

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mjg requested review of this revision.Feb 24 2023, 7:20 PM

Yea, it looks like it was coded this way (MNT_LAZY check in loop)
over twenty years ago (I looked in FreeBSD5. Couldn't be bothered
looking at even older code).

I agree it just seems silly to go through the loop doing nothing.

sys/fs/nfsclient/nfs_clvfsops.c
1911

I might stick it after the check for forced dismount
below, just in case something cares about the return
value someday. (The return value appears to be ignored
now.)

Just fyi, the buffer cache code I did for NFS way back in
the 1980s was not released as open source, so any code
in FreeBSD's NFS client related to the buffer cache or similar
was written by someone else. When I did the "new" NFS code
with NFSv4 in it, I intentionally cribbed all that stuff out of the
old FreeBSD NFS code, so that it would be "bug compatible"
out of the box.

mjg marked an inline comment as done.
This revision is now accepted and ready to land.Feb 26 2023, 1:11 AM
This revision was automatically updated to reflect the committed changes.