Page MenuHomeFreeBSD

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

Authored by rmacklem on Sat, Apr 27, 3:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 8, 1:11 PM
Unknown Object (File)
Fri, May 3, 5:09 AM
Unknown Object (File)
Wed, May 1, 10:05 PM
Unknown Object (File)
Wed, May 1, 11:12 AM
Unknown Object (File)
Mon, Apr 29, 5:21 PM
Unknown Object (File)
Sun, Apr 28, 5:35 AM
Unknown Object (File)
Sat, Apr 27, 1:00 PM
Unknown Object (File)
Sat, Apr 27, 12:19 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.Sat, Apr 27, 11:06 PM