diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2010-02-25 15:38:06 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-03-04 03:13:24 -0800 |
commit | 11433ebf94a58e0a40f115be8c6fe919c29ed61b (patch) | |
tree | 6fb9af4c1f81f2d807c35865ae04fb4cf57ba721 /xlators/cluster/dht/src/dht-common.c | |
parent | 549d1a81f49f58f842f69f64f7d152a3e6ecb0d0 (diff) |
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 <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
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
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 1c0cf682af8..326724a993d 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); |