d1681e
From 79eccaf175f9beb5b1bbda8a8e8cfa84829879ca Mon Sep 17 00:00:00 2001
d1681e
From: Krutika Dhananjay <kdhananj@redhat.com>
d1681e
Date: Mon, 26 Feb 2018 15:22:58 +0530
d1681e
Subject: [PATCH 168/180] features/shard: Pass the correct block-num to store
d1681e
 in inode ctx
d1681e
d1681e
> Upstream: https://review.gluster.org/19630
d1681e
> BUG: 1468483
d1681e
> Change-Id: Icf3a5d0598a081adb7d234a60bd15250a5ce1532
d1681e
d1681e
Change-Id: I790fddb241765663361139673f8ecaf19a3ff7fb
d1681e
BUG: 1493085
d1681e
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
d1681e
Reviewed-on: https://code.engineering.redhat.com/gerrit/131734
d1681e
Tested-by: RHGS Build Bot <nigelb@redhat.com>
d1681e
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
d1681e
---
d1681e
 xlators/features/shard/src/shard.c | 2 +-
d1681e
 1 file changed, 1 insertion(+), 1 deletion(-)
d1681e
d1681e
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
d1681e
index 3b6b41b..20a0608 100644
d1681e
--- a/xlators/features/shard/src/shard.c
d1681e
+++ b/xlators/features/shard/src/shard.c
d1681e
@@ -641,7 +641,6 @@ shard_common_resolve_shards (call_frame_t *frame, xlator_t *this,
d1681e
                         gf_msg_debug (this->name, 0, "Shard %d already "
d1681e
                                 "present. gfid=%s. Saving inode for future.",
d1681e
                                 shard_idx_iter, uuid_utoa(inode->gfid));
d1681e
-                        shard_idx_iter++;
d1681e
                         local->inode_list[i] = inode;
d1681e
                         /* Let the ref on the inodes that are already present
d1681e
                          * in inode table still be held so that they don't get
d1681e
@@ -655,6 +654,7 @@ shard_common_resolve_shards (call_frame_t *frame, xlator_t *this,
d1681e
                                                                 shard_idx_iter);
d1681e
                         }
d1681e
                         UNLOCK(&priv->lock);
d1681e
+                        shard_idx_iter++;
d1681e
 
d1681e
                          continue;
d1681e
                 } else {
d1681e
-- 
d1681e
1.8.3.1
d1681e