From 9d4ea7a870668d9af9bbd415ff9ad3aace59e170 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 10 Sep 2013 15:21:45 +0530 Subject: cluster/dht: Ignore subvols with error in min-free-disk/inodes Currently when selecting a alternative subvolume when hashed subvol has exceeded min-free-disk/inodes, we do not check if layouts have errors (including decommissioning). This leads to data being written to those subvolumes, and in case of decommissioning, will lead to data loss. BUG: 982919 > Original-Author: shishir gowda > Reviewed-on: http://review.gluster.org/5299 Change-Id: If301a86cf3ca5fad6529bd2e61382f9901663ba0 Signed-off-by: Amar Tumballi Reviewed-on: http://review.gluster.org/5888 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/dht/src/nufa.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xlators/cluster/dht/src/nufa.c') diff --git a/xlators/cluster/dht/src/nufa.c b/xlators/cluster/dht/src/nufa.c index 076ba3bba..20a9c5ade 100644 --- a/xlators/cluster/dht/src/nufa.c +++ b/xlators/cluster/dht/src/nufa.c @@ -320,7 +320,8 @@ nufa_create (call_frame_t *frame, xlator_t *this, if (dht_is_subvol_filled (this, (xlator_t *)conf->private)) { avail_subvol = dht_free_disk_available_subvol (this, - (xlator_t *)conf->private); + (xlator_t *)conf->private, + local); } if (subvol != avail_subvol) { @@ -425,7 +426,8 @@ nufa_mknod (call_frame_t *frame, xlator_t *this, if (dht_is_subvol_filled (this, (xlator_t *)conf->private)) { avail_subvol = dht_free_disk_available_subvol (this, - (xlator_t *)conf->private); + (xlator_t *)conf->private, + local); } if (avail_subvol != subvol) { -- cgit