summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2010-05-05 01:14:02 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-08 06:37:15 -0700
commita6096217aa96c4ee2fe39977f1d169a33be6fd40 (patch)
treef764946a20de92cac357575cb64f5bd3b919fb4b /xlators/cluster
parentb0ed997cda2195e9178cbaa96d26976aa6dd2acf (diff)
Check whether a server is down before calling rename on the directory
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 820 (distribute directory rename problem when one subvol is down) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=820
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/dht/src/dht-rename.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c
index 54c41120cde..d96c4b8a349 100644
--- a/xlators/cluster/dht/src/dht-rename.c
+++ b/xlators/cluster/dht/src/dht-rename.c
@@ -210,6 +210,13 @@ dht_rename_dir (call_frame_t *frame, xlator_t *this)
local->call_cnt = conf->subvolume_cnt;
+ for (i = 0; i < conf->subvolume_cnt; i++) {
+ if (!conf->subvolume_status[i]) {
+ op_errno = ENOTCONN;
+ goto err;
+ }
+ }
+
local->fd = fd_create (local->loc.inode, frame->root->pid);
if (!local->fd) {
gf_log (this->name, GF_LOG_ERROR,