d2787b
From 89cdfb40264c12105a1b4990fa9b45290aa6cef0 Mon Sep 17 00:00:00 2001
d2787b
From: Vinayakswami Hariharmath <vharihar@redhat.com>
d2787b
Date: Fri, 8 Oct 2021 09:40:41 +0530
d2787b
Subject: [PATCH 609/610] feature/shard: wrong dname results in dentry not
d2787b
 found error
d2787b
d2787b
Due to wrong dname passed to inode_unlink in
d2787b
shard_evicted_inode_fsync_cbk() resulting in dentry not found
d2787b
error.
d2787b
d2787b
This patch addresses the issue.
d2787b
d2787b
> upstream patch: https://github.com/gluster/glusterfs/pull/2475
d2787b
> Fixes: #2470
d2787b
> Change-Id: I6c479980ae3fa7ba558327055a9e5e5c2d2a850f
d2787b
> Signed-off-by: Vinayakswami Hariharmath vharihar@redhat.com
d2787b
d2787b
BUG: 1911665
d2787b
Change-Id: I96aa5f57303b69a08990de039ddeecad7e7ae6af
d2787b
Signed-off-by: Vinayakswami Hariharmath <vharihar@redhat.com>
d2787b
Reviewed-on: https://code.engineering.redhat.com/gerrit/c/rhs-glusterfs/+/280202
d2787b
Tested-by: RHGS Build Bot <nigelb@redhat.com>
d2787b
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
d2787b
---
d2787b
 xlators/features/shard/src/shard.c | 2 +-
d2787b
 1 file changed, 1 insertion(+), 1 deletion(-)
d2787b
d2787b
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
d2787b
index b828ff9..882373f 100644
d2787b
--- a/xlators/features/shard/src/shard.c
d2787b
+++ b/xlators/features/shard/src/shard.c
d2787b
@@ -950,7 +950,7 @@ shard_evicted_inode_fsync_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
d2787b
     {
d2787b
         __shard_inode_ctx_get(shard_inode, this, &ctx;;
d2787b
         if ((list_empty(&ctx->to_fsync_list)) && (list_empty(&ctx->ilist))) {
d2787b
-            shard_make_block_bname(ctx->block_num, shard_inode->gfid,
d2787b
+            shard_make_block_bname(ctx->block_num, ctx->base_gfid,
d2787b
                                    block_bname, sizeof(block_bname));
d2787b
             inode_unlink(shard_inode, priv->dot_shard_inode, block_bname);
d2787b
             /* The following unref corresponds to the ref held by
d2787b
-- 
d2787b
1.8.3.1
d2787b