|
|
d1681e |
From c2b215a14a38d3587a5a3ea4efab384033019ed5 Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: N Balachandran <nbalacha@redhat.com>
|
|
|
d1681e |
Date: Wed, 18 Jul 2018 22:09:19 +0530
|
|
|
d1681e |
Subject: [PATCH 329/333] cluster/dht: Set loc->gfid before healing attr
|
|
|
d1681e |
|
|
|
d1681e |
AFR takes inodelks when setting attrs. The loc->gfid
|
|
|
d1681e |
and loc->inode->gfid were both null when dht_dir_attr_heal
|
|
|
d1681e |
was called during a fresh lookup of an existing directory.
|
|
|
d1681e |
As the gfid is null, client_pre_inodelk asserts in the gfid
|
|
|
d1681e |
check.
|
|
|
d1681e |
We now set the loc->gfid before calling dht_dir_attr_heal.
|
|
|
d1681e |
|
|
|
d1681e |
upstream patch: https://review.gluster.org/#/c/20530/
|
|
|
d1681e |
|
|
|
d1681e |
> Change-Id: I457f5a73fd301d97a03ca032587e73d4803298ac
|
|
|
d1681e |
> fixes: bz#1602866
|
|
|
d1681e |
> Signed-off-by: N Balachandran <nbalacha@redhat.com>
|
|
|
d1681e |
|
|
|
d1681e |
Change-Id: Ie5e30d4ab3b824eaad333da22465d6672c75a2f6
|
|
|
d1681e |
BUG: 1601331
|
|
|
d1681e |
Signed-off-by: N Balachandran <nbalacha@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/144386
|
|
|
d1681e |
Reviewed-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
xlators/cluster/dht/src/dht-common.c | 3 ++-
|
|
|
d1681e |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
|
|
|
d1681e |
index 2207708..0984f8f 100644
|
|
|
d1681e |
--- a/xlators/cluster/dht/src/dht-common.c
|
|
|
d1681e |
+++ b/xlators/cluster/dht/src/dht-common.c
|
|
|
d1681e |
@@ -1518,7 +1518,6 @@ unlock:
|
|
|
d1681e |
if (local->need_attrheal) {
|
|
|
d1681e |
local->need_attrheal = 0;
|
|
|
d1681e |
if (!__is_root_gfid (inode->gfid)) {
|
|
|
d1681e |
- gf_uuid_copy (local->gfid, local->mds_stbuf.ia_gfid);
|
|
|
d1681e |
local->stbuf.ia_gid = local->mds_stbuf.ia_gid;
|
|
|
d1681e |
local->stbuf.ia_uid = local->mds_stbuf.ia_uid;
|
|
|
d1681e |
local->stbuf.ia_prot = local->mds_stbuf.ia_prot;
|
|
|
d1681e |
@@ -1532,6 +1531,8 @@ unlock:
|
|
|
d1681e |
goto skip_attr_heal;
|
|
|
d1681e |
}
|
|
|
d1681e |
copy_local->stbuf = local->stbuf;
|
|
|
d1681e |
+ gf_uuid_copy (copy_local->loc.gfid,
|
|
|
d1681e |
+ local->stbuf.ia_gfid);
|
|
|
d1681e |
copy_local->mds_stbuf = local->mds_stbuf;
|
|
|
d1681e |
copy_local->mds_subvol = local->mds_subvol;
|
|
|
d1681e |
copy->local = copy_local;
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|