diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2015-07-02 09:26:44 +0530 |
---|---|---|
committer | Xavier Hernandez <xhernandez@datalab.es> | 2015-07-21 14:43:40 -0700 |
commit | 53aa618c55a6a8e3e6eff78bea6399f079da35a6 (patch) | |
tree | 21c239d1490cc15280ca1d8d7cdb86962c73564d /xlators/cluster/ec | |
parent | bdb3591ba86333639c7c604d0f984006e5b8a1de (diff) |
cluster/ec: Remove locks in opendir
With readdir[p] taking locks to figure out which bricks are
good/bad, no need to take any locks on opendir.
>BUG: 1232172
>Change-Id: I4d924aeeaecab23af08c4598548a20d2a44cd849
>Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
>Reviewed-on: http://review.gluster.org/11506
>Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
>Tested-by: NetBSD Build System <jenkins@build.gluster.org>
>Tested-by: Gluster Build System <jenkins@build.gluster.com>
BUG: 1234679
Change-Id: Ibada9c196fb44a38400ef027f0a3a142d32797a6
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/11684
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Diffstat (limited to 'xlators/cluster/ec')
-rw-r--r-- | xlators/cluster/ec/src/ec-dir-read.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/xlators/cluster/ec/src/ec-dir-read.c b/xlators/cluster/ec/src/ec-dir-read.c index dee20665a9c..5469d62bc3f 100644 --- a/xlators/cluster/ec/src/ec-dir-read.c +++ b/xlators/cluster/ec/src/ec-dir-read.c @@ -130,13 +130,6 @@ int32_t ec_manager_opendir(ec_fop_data_t * fop, int32_t state) UNLOCK(&fop->fd->lock); /* Fall through */ - - case EC_STATE_LOCK: - ec_lock_prepare_inode(fop, &fop->loc[0], EC_QUERY_INFO); - ec_lock(fop); - - return EC_STATE_DISPATCH; - case EC_STATE_DISPATCH: ec_dispatch_all(fop); @@ -190,10 +183,9 @@ int32_t ec_manager_opendir(ec_fop_data_t * fop, int32_t state) cbk->op_errno, cbk->fd, cbk->xdata); } - return EC_STATE_LOCK_REUSE; + return EC_STATE_END; case -EC_STATE_INIT: - case -EC_STATE_LOCK: case -EC_STATE_DISPATCH: case -EC_STATE_PREPARE_ANSWER: case -EC_STATE_REPORT: @@ -205,18 +197,6 @@ int32_t ec_manager_opendir(ec_fop_data_t * fop, int32_t state) NULL, NULL); } - return EC_STATE_LOCK_REUSE; - - case -EC_STATE_LOCK_REUSE: - case EC_STATE_LOCK_REUSE: - ec_lock_reuse(fop); - - return EC_STATE_UNLOCK; - - case -EC_STATE_UNLOCK: - case EC_STATE_UNLOCK: - ec_unlock(fop); - return EC_STATE_END; default: |