]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
md/md-bitmap: add a none backend for bitmap grow
authorYu Kuai <yukuai@fnnas.com>
Sat, 25 Apr 2026 02:46:15 +0000 (10:46 +0800)
committerYu Kuai <yukuai@fnnas.com>
Tue, 28 Apr 2026 12:44:38 +0000 (20:44 +0800)
commitf2926a533d03fe70d753b512b713e06a2aa174af
treefea6bcd026cfec1735ad4143bcbaa4c274fc3ffd
parentaba3d6d6cb55c6e1116d1215140559dd7ecdf9a9
md/md-bitmap: add a none backend for bitmap grow

Add a real none bitmap backend that exposes the common bitmap sysfs
group and use it to keep bitmap/location available when an array has no
bitmap.

Then switch the bitmap location sysfs path to move only between none
and the classic bitmap backend, using the no-sysfs bitmap helpers while
merging or unmerging the internal bitmap sysfs group.

This restores mdadm --grow bitmap addition through bitmap/location.

Fixes: fb8cc3b0d9db ("md/md-bitmap: delay registration of bitmap_ops until creating bitmap")
Reviewed-by: Su Yue <glass.su@suse.com>
Link: https://lore.kernel.org/r/20260425024615.1696892-4-yukuai@fnnas.com
Signed-off-by: Yu Kuai <yukuai@fnnas.com>
drivers/md/md-bitmap.c
drivers/md/md.c
drivers/md/md.h