From e97c4e18c847803016aa60066cb6e57c528d83a6 Mon Sep 17 00:00:00 2001 From: Yu Kuai Date: Mon, 2 Dec 2024 09:59:12 +0800 Subject: mdadm: ask user if bitmap is not set Instead of auto-forcing bitmap only for large arrays, it is more reasonable to let user do the chooice if bimtap is not set. Signed-off-by: Yu Kuai Signed-off-by: Mariusz Tkaczyk --- mdadm.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mdadm.c') diff --git a/mdadm.c b/mdadm.c index 8cb4ba66..b7bcb336 100644 --- a/mdadm.c +++ b/mdadm.c @@ -1535,6 +1535,14 @@ int main(int argc, char *argv[]) break; } + if (!s.bitmap_file) { + if (c.runstop != 1 && s.level >= 1 && + ask("To optimalize recovery speed, it is recommended to enable write-indent bitmap, do you want to enable it now?")) + s.bitmap_file = "internal"; + else + s.bitmap_file = "none"; + } + rv = Create(ss, &ident, devs_found - 1, devlist->next, &s, &c); break; case MISC: -- cgit v1.2.3