Page MenuHomeFreeBSD

nfscl: Clear out a lot of cruft related to B_DIRECT that is never executed
ClosedPublic

Authored by rmacklem on Apr 27 2024, 3:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 21, 2:53 AM
Unknown Object (File)
Fri, Mar 20, 8:15 PM
Unknown Object (File)
Mon, Mar 16, 2:57 AM
Unknown Object (File)
Fri, Mar 13, 3:28 PM
Unknown Object (File)
Fri, Mar 13, 3:19 PM
Unknown Object (File)
Sat, Mar 7, 6:31 PM
Unknown Object (File)
Mar 5 2026, 2:41 PM
Unknown Object (File)
Mar 5 2026, 2:41 PM
Subscribers

Details

Summary

There is only one place in the unpatched sources where B_DIRECT is
set in the NFS client and this code is never executed. As such, this patch
removes this code that is never executed, since B_DIRECT should never
be set.

During a IETF testing event this week, I saw a crash in ncl_doio_directwrite(),
but this function is only called if B_DIRECT is set.
I cannot explain how ncl_doio_directwrite() got called, but once this patch
was applied to the sources, the crash did not recur. This is not surprising,
since this patch deleted the function.

Test Plan

Tested as a part of the IETF bakeathon this week and no further
crashes occurred. I have also put it through my typical NFS tests.

Diff Detail

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

Event Timeline

sys/fs/nfsclient/nfs_clbio.c
803
805
1615

Might be assert that B_DIRECT is not set?

sys/fs/nfsclient/nfs_clnfsiod.c
294

Again, assert?

rmacklem marked an inline comment as done.

Made the changes suggested by kib@.

This revision is now accepted and ready to land.Apr 27 2024, 11:06 PM