From 11433ebf94a58e0a40f115be8c6fe919c29ed61b Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Thu, 25 Feb 2010 15:38:06 +0000 Subject: distribute: Save ino/dev from first subvolume during mkdir A self-heal on directory creation results in the subsequent call to dht_selfheal_new_directory to happen only for the last subvolume. But when this function is called for the last subvol it is possible that the st_ino returned in this function's callback is the st_ino from the hashed subvolume(assigned in dht_mkdir_hashed_cbk). Signed-off-by: Shehjar Tikoo Signed-off-by: Anand V. Avati BUG: 597 (miscellaneous fixes for xlators to work well with NFS xlator) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=597 --- xlators/cluster/dht/src/dht-common.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xlators/cluster/dht') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 1c0cf682a..326724a99 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -3118,6 +3118,12 @@ dht_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, dht_stat_merge (this, &local->preparent, preparent, prev->this); dht_stat_merge (this, &local->postparent, postparent, prev->this); + + if (prev->this == dht_first_up_subvol (this)) { + local->st_ino = local->stbuf.st_ino; + local->st_dev = local->stbuf.st_dev; + } + } unlock: UNLOCK (&frame->lock); -- cgit