summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2017-08-31 02:23:25 +0200
committerShaohua Li <shli@fb.com>2017-09-01 07:57:03 +0200
commite8a27f836f165c26f867ece7f31eb5c811692319 (patch)
treec5cb1e121dccf6ce94396fa89af3ac605e0c807d /drivers/md/raid1.c
parentraid5-ppl: Recovery support for multiple partial parity logs (diff)
downloadlinux-e8a27f836f165c26f867ece7f31eb5c811692319.tar.xz
linux-e8a27f836f165c26f867ece7f31eb5c811692319.zip
md/bitmap: disable bitmap_resize for file-backed bitmaps.
bitmap_resize() does not work for file-backed bitmaps. The buffer_heads are allocated and initialized when the bitmap is read from the file, but resize doesn't read from the file, it loads from the internal bitmap. When it comes time to write the new bitmap, the bh is non-existent and we crash. The common case when growing an array involves making the array larger, and that normally means making the bitmap larger. Doing that inside the kernel is possible, but would need more code. It is probably easier to require people who use file-backed bitmaps to remove them and re-add after a reshape. So this patch disables the resizing of arrays which have file-backed bitmaps. This is better than crashing. Reported-by: Zhilong Liu <zlliu@suse.com> Fixes: d60b479d177a ("md/bitmap: add bitmap_resize function to allow bitmap resizing.") Cc: stable@vger.kernel.org (v3.5+). Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid1.c')
0 files changed, 0 insertions, 0 deletions