[Devel] [PATCH rh7] ploop: Fallback to maintaince_mode in ploop v1 format
Kirill Tkhai
ktkhai at virtuozzo.com
Wed Sep 4 16:58:29 MSK 2019
In v1 format (vz6 default) holes_bitmap is not allocated,
while holes are punched. So, further realloc increases
image size more and more (despite really allocated block
number is small). Then, we go over image limits.
This patch prohibits discard for v1 format completely.
https://jira.sw.ru/browse/PSBM-97319
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/block/ploop/fmt_ploop1.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index 5fc2931ee324..fd928bd12cf7 100644
--- a/drivers/block/ploop/fmt_ploop1.c
+++ b/drivers/block/ploop/fmt_ploop1.c
@@ -153,8 +153,10 @@ static int populate_holes_bitmap(struct ploop_delta *delta,
return 0;
/* To do: add discard alignment for v1 */
- if (delta->plo->fmt_version != PLOOP_FMT_V2)
+ if (delta->plo->fmt_version != PLOOP_FMT_V2) {
+ set_bit(PLOOP_S_NO_FALLOC_DISCARD, &delta->plo->state);
return 0;
+ }
ret = -ENOMEM;
page = alloc_page(GFP_KERNEL);
More information about the Devel
mailing list