[Bugs] [Bug 1439163] New: Shouldn' t set inode_ctx to be LOOKUP_NOT_NEEDED before lookup fop finish
bugzilla at redhat.com
bugzilla at redhat.com
Wed Apr 5 11:04:16 UTC 2017
https://bugzilla.redhat.com/show_bug.cgi?id=1439163
Bug ID: 1439163
Summary: Shouldn't set inode_ctx to be LOOKUP_NOT_NEEDED before
lookup fop finish
Product: GlusterFS
Version: mainline
Component: fuse
Assignee: bugs at gluster.org
Reporter: johnzzpcrystal at gmail.com
CC: bugs at gluster.org
Description of problem:
the function inode_needs_lookup:
1953 uint64_t need_lookup = 0;
1954 gf_boolean_t ret = _gf_false;
1955 int op_ret = -1;
1956
1957 if (!inode || !this)
1958 return ret;
1959
1960 ret = _gf_true;
1961
1962 op_ret = inode_ctx_get (inode, this, &need_lookup);
1963 if (!op_ret && need_lookup == LOOKUP_NOT_NEEDED) {
1964 ret = _gf_false;
1965 }
1966
1967 return ret;
The inode will be state LOOKUP_NOT_NEEDED after checked by this function.
It will be wrong if the next lookup fop on this inode go to failed.And maybe
there will be a race condition, the other thread will check this inode's state
before it's current lookup finish.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list