[Bugs] [Bug 1164503] New: After readv, md-cache only checks cache times if read was empty
bugzilla at redhat.com
bugzilla at redhat.com
Sat Nov 15 21:41:55 UTC 2014
https://bugzilla.redhat.com/show_bug.cgi?id=1164503
Bug ID: 1164503
Summary: After readv, md-cache only checks cache times if read
was empty
Product: GlusterFS
Version: mainline
Component: core
Keywords: Patch, Triaged
Severity: medium
Assignee: ndevos at redhat.com
Reporter: ndevos at redhat.com
CC: bugs at gluster.org, gluster-bugs at redhat.com
Blocks: 1158129
+++ This bug was initially created as a clone of Bug #1158129 +++
When md-cache is handling a readv callback, its logic is to skip checking the
file's iatt (to see if it has changed since the time of the last cache) if
"op_ret != 0".
I suspect that is a mistake, and the intent was to skip only on error; for
other fops, op_ret is 0 on success and nonzero on error, and md-cache has the
same code for them.
For readv, though, op_ret is the number of bytes read, so it will normally be
positive except on EOF.
The attached patch changes "op_ret != 0" to "op_ret < 0" to skip the check only
when an error was returned.
(Or, if the intent was really to check cache validity only on an EOF condition
when op_ret is zero, then probably a comment to that effect should be added).
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1158129
[Bug 1158129] After readv, md-cache only checks cache times if read was
empty
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=HiBsHcb5E0&a=cc_unsubscribe
More information about the Bugs
mailing list