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)
Thu, Mar 13, 9:53 AM
Unknown Object (File)
Wed, Mar 12, 7:21 AM
Unknown Object (File)
Feb 22 2025, 2:17 AM
Unknown Object (File)
Feb 18 2025, 8:28 PM
Unknown Object (File)
Jan 29 2025, 10:33 AM
Unknown Object (File)
Jan 27 2025, 1:31 PM
Unknown Object (File)
Jan 20 2025, 1:29 PM
Unknown Object (File)
Jan 14 2025, 12:56 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.