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)
Oct 22 2024, 10:12 AM
Unknown Object (File)
Oct 22 2024, 10:12 AM
Unknown Object (File)
Oct 22 2024, 10:12 AM
Unknown Object (File)
Oct 22 2024, 10:01 AM
Unknown Object (File)
Sep 26 2024, 5:32 AM
Unknown Object (File)
Sep 23 2024, 6:12 AM
Unknown Object (File)
Sep 23 2024, 4:03 AM
Unknown Object (File)
Sep 15 2024, 5:33 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.