diff options
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 4 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-linkfile.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 35bf180f535..4a8e035c21c 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 9dd487bc87b..7acebd290e3 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); |