summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2010-05-05 00:58:40 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-08 06:37:46 -0700
commit92ad83c99472eb858363fc3bb0aba3ea6fc9ec8b (patch)
treefba762215503ecd12e29413ce343add2d22207a3
parent2f6b222476a6ca0e5d96946876e1a53eccad9fe7 (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
-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 92e305613d0..1c870365eea 100644
--- a/xlators/cluster/dht/src/dht-rename.c
+++ b/xlators/cluster/dht/src/dht-rename.c
@@ -205,6 +205,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,