diff options
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 8 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-write.c | 3 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 4 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-linkfile.c | 3 |
4 files changed, 16 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index f000aaf92..a484fd489 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -840,6 +840,10 @@ afr_fresh_lookup_cbk (call_frame_t *frame, void *cookie, *lookup_buf = *buf; + uuid_copy (local->loc.gfid, buf->ia_gfid); + uuid_copy (local->loc.pargfid, + postparent->ia_gfid); + lookup_buf->ia_ino = afr_itransform (buf->ia_ino, priv->child_count, child_index); @@ -869,6 +873,10 @@ afr_fresh_lookup_cbk (call_frame_t *frame, void *cookie, local->cont.lookup.postparent = *postparent; *lookup_buf = *buf; + + uuid_copy (local->loc.gfid, buf->ia_gfid); + uuid_copy (local->loc.pargfid, + postparent->ia_gfid); } } diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index 06559ede0..30fcf92b6 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -69,6 +69,9 @@ afr_build_parent_loc (loc_t *parent, loc_t *child) parent->inode = inode_ref (child->parent); parent->parent = inode_parent (parent->inode, 0, NULL); parent->ino = parent->inode->ino; + + if (!uuid_is_null (child->pargfid)) + uuid_copy (parent->gfid, child->pargfid); } /* {{{ create */ diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 35bf180f5..4a8e035c2 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -4022,8 +4022,8 @@ dht_mkdir_hashed_cbk (call_frame_t *frame, void *cookie, conf = this->private; hashed_subvol = local->hashed_subvol; - if (uuid_is_null (local->loc.inode->gfid) && !op_ret) - memcpy (local->loc.inode->gfid, stbuf->ia_gfid, 16); + if (uuid_is_null (local->loc.gfid) && !op_ret) + uuid_copy (local->loc.gfid, stbuf->ia_gfid); if (dht_is_subvol_filled (this, hashed_subvol)) ret = dht_layout_merge (this, layout, prev->this, diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c index 9dd487bc8..7acebd290 100644 --- a/xlators/cluster/dht/src/dht-linkfile.c +++ b/xlators/cluster/dht/src/dht-linkfile.c @@ -92,6 +92,9 @@ dht_linkfile_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local->linkfile.stbuf = *stbuf; + if (uuid_is_null (local->linkfile.loc.inode->gfid)) + uuid_copy (local->linkfile.loc.gfid, stbuf->ia_gfid); + STACK_WIND (frame, dht_linkfile_xattr_cbk, prev->this, prev->this->fops->setxattr, &local->linkfile.loc, local->linkfile.xattr, 0); |