summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-inode-read.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/ec/src/ec-inode-read.c')
-rw-r--r--xlators/cluster/ec/src/ec-inode-read.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/xlators/cluster/ec/src/ec-inode-read.c b/xlators/cluster/ec/src/ec-inode-read.c
index bc3d94c7e61..78a189bc325 100644
--- a/xlators/cluster/ec/src/ec-inode-read.c
+++ b/xlators/cluster/ec/src/ec-inode-read.c
@@ -254,11 +254,11 @@ int32_t ec_manager_getxattr(ec_fop_data_t * fop, int32_t state)
case EC_STATE_LOCK:
if (fop->fd == NULL)
{
- ec_lock_prepare_inode(fop, &fop->loc[0]);
+ ec_lock_prepare_inode(fop, &fop->loc[0], 0);
}
else
{
- ec_lock_prepare_fd(fop, fop->fd);
+ ec_lock_prepare_fd(fop, fop->fd, 0);
}
ec_lock(fop);
@@ -337,7 +337,7 @@ int32_t ec_manager_getxattr(ec_fop_data_t * fop, int32_t state)
case -EC_STATE_LOCK_REUSE:
case EC_STATE_LOCK_REUSE:
- ec_lock_reuse(fop, 0);
+ ec_lock_reuse(fop);
return EC_STATE_UNLOCK;
@@ -516,6 +516,8 @@ void ec_fgetxattr(call_frame_t * frame, xlator_t * this, uintptr_t target,
goto out;
}
+ fop->use_fd = 1;
+
if (fd != NULL)
{
fop->fd = fd_ref(fd);
@@ -1230,7 +1232,7 @@ int32_t ec_manager_readv(ec_fop_data_t * fop, int32_t state)
/* Fall through */
case EC_STATE_LOCK:
- ec_lock_prepare_fd(fop, fop->fd);
+ ec_lock_prepare_fd(fop, fop->fd, 0);
ec_lock(fop);
return EC_STATE_GET_SIZE_AND_VERSION;
@@ -1310,7 +1312,7 @@ int32_t ec_manager_readv(ec_fop_data_t * fop, int32_t state)
case -EC_STATE_LOCK_REUSE:
case EC_STATE_LOCK_REUSE:
- ec_lock_reuse(fop, 0);
+ ec_lock_reuse(fop);
return EC_STATE_UNLOCK;
@@ -1350,6 +1352,8 @@ void ec_readv(call_frame_t * frame, xlator_t * this, uintptr_t target,
goto out;
}
+ fop->use_fd = 1;
+
fop->size = size;
fop->offset = offset;
fop->uint32 = flags;
@@ -1478,11 +1482,11 @@ int32_t ec_manager_stat(ec_fop_data_t * fop, int32_t state)
case EC_STATE_LOCK:
if (fop->fd == NULL)
{
- ec_lock_prepare_inode(fop, &fop->loc[0]);
+ ec_lock_prepare_inode(fop, &fop->loc[0], 0);
}
else
{
- ec_lock_prepare_fd(fop, fop->fd);
+ ec_lock_prepare_fd(fop, fop->fd, 0);
}
ec_lock(fop);
@@ -1581,7 +1585,7 @@ int32_t ec_manager_stat(ec_fop_data_t * fop, int32_t state)
case -EC_STATE_LOCK_REUSE:
case EC_STATE_LOCK_REUSE:
- ec_lock_reuse(fop, 0);
+ ec_lock_reuse(fop);
return EC_STATE_UNLOCK;
@@ -1741,6 +1745,8 @@ void ec_fstat(call_frame_t * frame, xlator_t * this, uintptr_t target,
goto out;
}
+ fop->use_fd = 1;
+
if (fd != NULL)
{
fop->fd = fd_ref(fd);