Bug 1439163 - Shouldn't set inode_ctx to be LOOKUP_NOT_NEEDED before lookup fop finish
Summary: Shouldn't set inode_ctx to be LOOKUP_NOT_NEEDED before lookup fop finish
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: GlusterFS
Classification: Community
Component: fuse
Version: mainline
Hardware: Unspecified
OS: All
unspecified
unspecified
Target Milestone: ---
Assignee: Zhou Zhengping
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-05 11:04 UTC by Zhou Zhengping
Modified: 2019-05-11 10:35 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-05-11 10:35:11 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Zhou Zhengping 2017-04-05 11:04:16 UTC
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:

Comment 1 Worker Ant 2017-04-05 11:08:27 UTC
REVIEW: https://review.gluster.org/17002 (fuse: Shouldn't set inode_ctx to be LOOKUP_NOT_NEEDED before lookup fop finish.) posted (#1) for review on master by Zhou Zhengping (johnzzpcrystal)

Comment 2 Amar Tumballi 2019-05-11 10:35:11 UTC
'inode_need_lookup()' itself is now now (glusterfs-6.x) removed.


Note You need to log in before you can comment on or make changes to this bug.