diff options
author | Anand Avati <avati@gluster.com> | 2009-12-06 12:47:25 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-12-06 10:35:10 -0800 |
commit | 72e82741b52fb749eb912f97848b707d97ec69ff (patch) | |
tree | d3ddf00b7ced95c4fce0e00999bfb4a228cb10fe | |
parent | 0117cf0d3dfeb49b739e0da84f429b5375fd922a (diff) |
distribute: return st_dev from the same subvol from where itransform is performed
distribute should return st_dev from the same subvolume it itransforms the inode
number. this is to ensure that there will not be false replacements of inodes in
inode management
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 433 (Posix conformance test failed on 3.0.0pre2 (Dec 3) release)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=433
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 4 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 3a38b67ff..36d503dfa 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -282,6 +282,8 @@ dht_revalidate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local->op_ret = 0; local->stbuf.st_ino = local->st_ino; + local->stbuf.st_dev = local->loc.inode->generation; + if (local->loc.parent) local->postparent.st_ino = local->loc.parent->ino; @@ -2930,6 +2932,7 @@ dht_mkdir_selfheal_cbk (call_frame_t *frame, void *cookie, if (op_ret == 0) { dht_layout_set (this, local->inode, layout); local->stbuf.st_ino = local->st_ino; + local->stbuf.st_ino = local->st_dev; if (local->loc.parent) { local->preparent.st_ino = local->loc.parent->ino; local->postparent.st_ino = local->loc.parent->ino; @@ -3032,6 +3035,7 @@ dht_mkdir_hashed_cbk (call_frame_t *frame, void *cookie, dht_stat_merge (this, &local->postparent, postparent, prev->this); local->st_ino = local->stbuf.st_ino; + local->st_dev = local->stbuf.st_dev; local->call_cnt = conf->subvolume_cnt - 1; diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index c417a8596..5a43f9c06 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -73,6 +73,7 @@ struct dht_local { dht_layout_t *layout; size_t size; ino_t st_ino; + ino_t st_dev; xlator_t *src_hashed, *src_cached; xlator_t *dst_hashed, *dst_cached; xlator_t *cached_subvol; |