summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorKinglong Mee <mijinlong@horiscale.com>2019-05-13 16:42:01 +0800
committerXavi Hernandez <xhernandez@redhat.com>2019-06-25 16:30:00 +0000
commit40c18b189f31a87b5c5f9344c4a0ab44cb61ef75 (patch)
tree969c262d399bd42cf8b670b0addd008c9818c88c /api
parentd58594d802d617ed81b8f991fd312c224f1f85d4 (diff)
gfapi: set right pargfid according to parent's inode
EC updates parent's inode from loc, when pargfid is not the parent's inode's, a warnning message is print, and an error is returned to up xlator. [ec-helpers.c:400:ec_loc_gfid_check] 0-openfs1-disperse-0: Mismatching GFID's in loc Change-Id: Ie8036be91f039083a1e3fe17ec235a222df84b97 fixes: bz#1723280 Signed-off-by: Kinglong Mee <mijinlong@horiscale.com>
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs-resolve.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index a79f490..e03bbec 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -335,6 +335,7 @@ glfs_resolve_component(struct glfs *fs, xlator_t *subvol, inode_t *parent,
if (temp_parent) {
inode_unref(loc.parent);
loc.parent = temp_parent;
+ gf_uuid_copy(loc.pargfid, temp_parent->gfid);
inode_find_directory_name(loc.inode, &loc.name);
}
@@ -345,10 +346,12 @@ glfs_resolve_component(struct glfs *fs, xlator_t *subvol, inode_t *parent,
if (temp_parent) {
inode_unref(loc.parent);
loc.parent = temp_parent;
+ gf_uuid_copy(loc.pargfid, temp_parent->gfid);
inode_find_directory_name(loc.inode, &loc.name);
} else if (__is_root_gfid(loc.inode->gfid)) {
inode_unref(loc.parent);
loc.parent = inode_ref(loc.inode);
+ gf_uuid_copy(loc.pargfid, loc.inode->gfid);
loc.name = ".";
} else {
inode_unref(loc.inode);