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
F108281555: D44980.id137764.diff
Thu, Jan 23, 11:37 AM
Unknown Object (File)
Tue, Jan 14, 3:03 AM
Unknown Object (File)
Tue, Jan 14, 3:03 AM
Unknown Object (File)
Tue, Jan 14, 3:03 AM
Unknown Object (File)
Tue, Jan 14, 3:03 AM
Unknown Object (File)
Tue, Jan 14, 2:51 AM
Unknown Object (File)
Thu, Jan 9, 9:13 PM
Unknown Object (File)
Thu, Jan 9, 11:11 AM
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 Skipped
Unit
Tests Skipped

Event Timeline

sys/fs/nfsclient/nfs_clbio.c
794
796
1612

Might be assert that B_DIRECT is not set?

sys/fs/nfsclient/nfs_clnfsiod.c
297

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