Re: [PATCH] Grow: fix can't change bitmap type from none to clustered.
From: Heming Zhao <hidden>
Date: 2023-02-23 23:50:34
Hello Jes, On 2/24/23 2:23 AM, Jes Sorensen wrote:
On 2/23/23 09:39, Heming Zhao wrote:quoted
Commit a042210648ed ("disallow create or grow clustered bitmap with writemostly set") introduced this bug. We should use 'true' logic not '== 0' to deny setting up clustered array under WRITEMOSTLY condition. How to trigger~/mdadm # ./mdadm -Ss && ./mdadm --zero-superblock /dev/sd{a,b} ~/mdadm # ./mdadm -C /dev/md0 -l mirror -b clustered -e 1.2 -n 2 \ /dev/sda /dev/sdb --assume-clean mdadm: array /dev/md0 started. ~/mdadm # ./mdadm --grow /dev/md0 --bitmap=none ~/mdadm # ./mdadm --grow /dev/md0 --bitmap=clustered mdadm: /dev/md0 disks marked write-mostly are not supported with clustered bitmapSigned-off-by: Heming Zhao <redacted>Applied! Thanks, Jes
With Paul Menzel comment, I will remove the dot/period in patch subject then send a v2. ------------------ @Nigel Croxon or other people Yesterday my brain only focused on fixing bug, no thinking the a042210648ed use case. Why or what reason makes the rule for clustered array denies to use write-mostly disk? I could image a scenario to use write-mostly disk. In cloud env, VMs have two legs, one is local shared disk for speed up IOs, another is remote shared disk (e.g: JBD) for back up. If anyone think this scenario makes sense, the best solution is to revert a042210648ed. Thanks, Heming