From dbb66771878d8cb7e27ebc995c852603d6b35bda Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Wed, 8 Jun 2011 09:03:16 +0000 Subject: DHT selheal dir: Recreate dirs with correct gfid. When selfheal of dir is triggered, make sure the dirs are recreated with the correct gfid, to prevent mismatch of gfids in the backend. Also, remove the spurious memcpy to inode.gfid Signed-off-by: shishir gowda Signed-off-by: Anand Avati BUG: 2994 ([glusterfs-3.2.1qa2]: untar and rm in parallel hangs untar) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2994 --- xlators/cluster/dht/src/dht-common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'xlators/cluster/dht') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 47e6e8abe..d6753ff59 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -4059,9 +4059,6 @@ 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 (dht_is_subvol_filled (this, hashed_subvol)) ret = dht_layout_merge (this, layout, prev->this, -1, ENOSPC, NULL); @@ -4241,6 +4238,7 @@ unlock: /* TODO: neater interface needed below */ local->stbuf.ia_type = local->loc.inode->ia_type; + uuid_copy (local->gfid, local->loc.inode->gfid); dht_selfheal_restore (frame, dht_rmdir_selfheal_cbk, &local->loc, local->layout); } else { -- cgit