[Devel] [PATCH RHEL7 COMMIT] ploop: Do not warn when BAT is wider than disk size

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jun 14 19:08:45 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-957.12.2.vz7.96.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.12.2.vz7.96.15
------>
commit 68adc3cf3897fbb488cc960c2c71db9eedd7bd53
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Jun 14 19:08:43 2019 +0300

    ploop: Do not warn when BAT is wider than disk size
    
    BAT area can address wider region, than disk size.
    This may be a result of shrinking large disk
    to a small size, when we just change disk size,
    but the first data block offset and nr bat entries
    remain the same.
    
    https://jira.sw.ru/browse/PSBM-95293
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/fmt_ploop1.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index 1e2e8f1cc3d1..0d4c587f46b4 100644
--- a/drivers/block/ploop/fmt_ploop1.c
+++ b/drivers/block/ploop/fmt_ploop1.c
@@ -164,7 +164,13 @@ static int populate_holes_bitmap(struct ploop_delta *delta,
 	block = 0;
 	while (block < nr_blocks) {
 		if (!ploop1_map_index(delta, block, &sec)) {
-			WARN_ONCE(1, "Can't map block\n");
+			/*
+			 * BAT area can address wider region, than disk size.
+			 * This may be a result of shrinking large disk
+			 * to a small size.
+			 */
+			pr_info("ploop%u: bat is bigger than disk size\n",
+				delta->plo->index);
 			goto put_page;
 		}
 		ret = delta->io.ops->sync_read(&delta->io, page,



More information about the Devel mailing list