]> git.ipfire.org Git - thirdparty/mdadm.git/commit
mdadm: fix --grow with --add for linear
authorYu Kuai <yukuai3@huawei.com>
Fri, 27 Dec 2024 06:07:02 +0000 (14:07 +0800)
committerNigel Croxon <109605997+ncroxon@users.noreply.github.com>
Tue, 28 Jan 2025 14:26:38 +0000 (09:26 -0500)
commitc09ae8417dc9e11da1d5bf2867c6498050c6ddb9
tree4aa8838ae29a139872efecca9139b895c3fb0bb1
parent21e4efb1cd15c4de4a57de26b0ea2e4234aa8ce5
mdadm: fix --grow with --add for linear

For the case mdadm --grow with --add, the s.btype should not be
initialized yet, hence BitmapUnknown should be checked instead of
BitmapNone.

Noted that this behaviour should only support by md-linear, which is
removed from kernel, howerver, it turns out md-linear is used widely
in home NAS and we're planning to reintroduce it soon.

Fixes: 581ba1341017 ("mdadm: remove bitmap file support")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Mariusz Tkaczyk <mtkaczyk@kernel.org>
mdadm.c