diff options
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-linkfile.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 113c7a18d..267ef8f6a 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -4028,7 +4028,8 @@ dht_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (prev->this == dht_first_up_subvol (this)) { local->ia_ino = local->stbuf.ia_ino; } - + if (uuid_is_null (local->loc.gfid) && !op_ret) + uuid_copy (local->loc.gfid, stbuf->ia_gfid); } unlock: UNLOCK (&frame->lock); @@ -4086,6 +4087,8 @@ dht_mkdir_hashed_cbk (call_frame_t *frame, void *cookie, local->call_cnt = conf->subvolume_cnt - 1; if (local->call_cnt == 0) { + if (uuid_is_null (local->loc.gfid) && !op_ret) + uuid_copy (local->loc.gfid, stbuf->ia_gfid); dht_selfheal_directory (frame, dht_mkdir_selfheal_cbk, &local->loc, layout); } diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c index 23314c1a5..82419a68b 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); |