Page MenuHomeFreeBSD

Make the code match the comments. If we have ANY buf's that failed then return EAGAIN. The current code just returns that if the LAST buf failed.
ClosedPublic

Authored by imp on Feb 19 2017, 7:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 29, 11:27 PM
Unknown Object (File)
Dec 20 2023, 3:34 AM
Unknown Object (File)
Dec 16 2023, 1:35 PM
Unknown Object (File)
Nov 13 2023, 12:09 PM
Unknown Object (File)
Oct 25 2023, 7:47 AM
Unknown Object (File)
Sep 30 2023, 10:50 PM
Unknown Object (File)
Sep 25 2023, 4:05 PM
Unknown Object (File)
Sep 11 2023, 1:50 PM
Subscribers
None

Details

Summary

This code just appears to be wrong. Logically, it makes more sense to
do what the comments say.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp retitled this revision from to Make the code match the comments. If we have ANY buf's that failed then return EAGAIN. The current code just returns that if the LAST buf failed..
imp updated this object.
imp edited the test plan for this revision. (Show Details)
imp added reviewers: kib, trasz.
kib edited edge metadata.
This revision is now accepted and ready to land.Feb 19 2017, 8:30 PM
trasz edited edge metadata.

My worry here is that with this patch, we won't retry fsync if it failed with EIO, while with the previous code, due to the logic error, we would (at least if the failed buf was not the last one). I'm not sure if anything depends on it, though.

I'd say go for it. We can improve the semantics later, and this is an obvious bug fix.

This revision was automatically updated to reflect the committed changes.