diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2017-06-25 16:34:01 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2017-10-24 09:30:25 +0000 |
commit | a8e16c81e3d14b577ac738574e19a16543df419e (patch) | |
tree | 963abf9f48d65fc469564d9f558aa6fe60bfe296 /xlators/cluster/ec/src/ec-dir-read.c | |
parent | 1260ee53b1674234e6f083563bdcd258e46a6faa (diff) |
cluster/ec: Allow parallel writes in EC if possible
Problem:
Ec at the moment sends one modification fop after another, so if some of
the disks become slow, for a while then the wait time for the writes that
are waiting in the queue becomes really bad.
Fix:
Allow parallel writes when possible. For this we need to make 3 changes.
1) Each fop now has range parameters they will be updating.
2) Xattrop is changed to handle parallel xattrop requests where some
would be modifying just dirty xattr.
3) Fops that refer to size now take locks and update the locks.
Fixes #251
Change-Id: Ibc3c15372f91bbd6fb617f0d99399b3149fa64b2
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-dir-read.c')
-rw-r--r-- | xlators/cluster/ec/src/ec-dir-read.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/cluster/ec/src/ec-dir-read.c b/xlators/cluster/ec/src/ec-dir-read.c index 4fe82e3c0b6..48afe54460f 100644 --- a/xlators/cluster/ec/src/ec-dir-read.c +++ b/xlators/cluster/ec/src/ec-dir-read.c @@ -141,7 +141,8 @@ int32_t ec_manager_opendir(ec_fop_data_t * fop, int32_t state) /* Fall through */ case EC_STATE_LOCK: - ec_lock_prepare_inode(fop, &fop->loc[0], EC_QUERY_INFO); + ec_lock_prepare_inode(fop, &fop->loc[0], EC_QUERY_INFO, 0, + LLONG_MAX); ec_lock(fop); return EC_STATE_DISPATCH; @@ -432,7 +433,8 @@ int32_t ec_manager_readdir(ec_fop_data_t * fop, int32_t state) } fop->mask &= 1ULL << idx; } else { - ec_lock_prepare_fd(fop, fop->fd, EC_QUERY_INFO); + ec_lock_prepare_fd(fop, fop->fd, EC_QUERY_INFO, 0, + LLONG_MAX); ec_lock(fop); } |