summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-types.h
diff options
context:
space:
mode:
authorAshish Pandey <aspandey@redhat.com>2018-11-28 11:22:52 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2019-04-16 10:50:49 +0000
commitf792fd01aab1e50b4f662305e9c417064bd37c30 (patch)
tree7de0e5ba1cdc74160ff674602ef6466c09c62f57 /xlators/cluster/ec/src/ec-types.h
parentaca7ec21ed1823440abe8409f7f9c4a8864cf8fa (diff)
cluster/ec: Don't enqueue an entry if it is already healing
Problem: 1 - heal-wait-qlength is by default 128. If shd is disabled and we need to heal files, client side heal is needed. If we access these files that will trigger the heal. However, it has been observed that a file will be enqueued multiple times in the heal wait queue, which in turn causes queue to be filled and prevent other files to be enqueued. 2 - While a file is going through healing and a write fop from mount comes on that file, it sends write on all the bricks including healing one. At the end it updates version and size on all the bricks. However, it does not unset dirty flag on all the bricks, even if this write fop was successful on all the bricks. After healing completion this dirty flag remain set and never gets cleaned up if SHD is disabled. Solution: 1 - If an entry is already in queue or going through heal process, don't enqueue next client side request to heal the same file. 2 - Unset dirty on all the bricks at the end if fop has succeeded on all the bricks even if some of the bricks are going through heal. Change-Id: Ia61ffe230c6502ce6cb934425d55e2f40dd1a727 updates: bz#1693223 Signed-off-by: Ashish Pandey <aspandey@redhat.com> (cherry picked from commit 313dcefe7a62bd16cd794040df068f9bec9c6927)
Diffstat (limited to 'xlators/cluster/ec/src/ec-types.h')
-rw-r--r--xlators/cluster/ec/src/ec-types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-types.h b/xlators/cluster/ec/src/ec-types.h
index f3d63ca09ce..6ae4a2b970e 100644
--- a/xlators/cluster/ec/src/ec-types.h
+++ b/xlators/cluster/ec/src/ec-types.h
@@ -171,6 +171,7 @@ struct _ec_inode {
gf_boolean_t have_config;
gf_boolean_t have_version;
gf_boolean_t have_size;
+ int32_t heal_count;
ec_config_t config;
uint64_t pre_version[2];
uint64_t post_version[2];