Signed-off-by: Dmitry Monakhov <dmonak...@openvz.org> --- misc/e4defrag2.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c index f1db897..8714f47 100644 --- a/misc/e4defrag2.c +++ b/misc/e4defrag2.c @@ -1848,6 +1848,7 @@ static int prepare_donor(struct defrag_context *dfx, dgrp_t group, printf("%s grp:%u donor_fd:%d blocks:%llu frag:%u\n", __func__, group, donor->fd, blocks, max_frag); } + assert(blocks); /* First try to reuse existing donor if available */ if (donor->fd != -1) { @@ -2267,6 +2268,10 @@ next_cluster: } prev = rfh; + /* Do we have somthing to relocate */ + if (!blocks) + return 0; + ret = prepare_donor(dfx, idx, &donor, blocks, dfx->ief_force_local, 2); if (ret) { if (debug_flag & DBG_SCAN) -- 1.8.3.1 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel