diff options
author | Amar Tumballi <amar@gluster.com> | 2009-04-13 23:40:22 -0700 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-14 14:51:53 +0530 |
commit | 33e81bc94986929caab14a05231b25787a25a41b (patch) | |
tree | 6337d00296825fd6fc461c813c2f96ff67366fba /xlators/cluster/dht/src/dht-selfheal.c | |
parent | d8bc2834d056a23f55bd86a5fd704bd81e35836d (diff) |
bug fixes in dht-disk-usage feature.
fixes bugs seen with dht's disk usage.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-selfheal.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-selfheal.c | 11 |
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; |