[Devel] [PATCH 07/10] patch ief_defrag_zoroes.patch
Dmitry Monakhov
dmonakhov at openvz.org
Thu Feb 25 02:54:30 PST 2016
Signed-off-by: Dmitry Monakhov <dmonakhov at 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
More information about the Devel
mailing list