From a6096217aa96c4ee2fe39977f1d169a33be6fd40 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Wed, 5 May 2010 01:14:02 +0000 Subject: Check whether a server is down before calling rename on the directory Signed-off-by: Raghavendra Bhat Signed-off-by: Anand V. Avati BUG: 820 (distribute directory rename problem when one subvol is down) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=820 --- xlators/cluster/dht/src/dht-rename.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xlators/cluster/dht/src/dht-rename.c') 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, -- cgit