summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-selfheal.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/dht-selfheal.c')
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index 8b6bdabd681..b51906ac5aa 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -293,6 +293,17 @@ dht_selfheal_layout_new_directory (call_frame_t *frame, loc_t *loc,
}
}
+ /* no subvolume has enough space, but can't stop directory creation */
+ if (!cnt) {
+ for (i = 0; i < layout->cnt; i++) {
+ err = layout->list[i].err;
+ if (err == ENOSPC) {
+ layout->list[i].err = -1;
+ cnt++;
+ }
+ }
+ }
+
chunk = ((unsigned long) 0xffffffff) / cnt;
start = 0;