Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30b67645 authored by NeilBrown's avatar NeilBrown
Browse files

md/raid5: Allow reshape while a bitmap is present.



We always should have allowed this.  A raid5 reshape doesn't change
the size of the bitmap, so not need to restrict it.

Also add a test to make sure we don't try to start a reshape on a
failed array.

Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent bb63a701
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -5559,9 +5559,6 @@ static int check_reshape(struct mddev *mddev)
	    mddev->new_layout == mddev->layout &&
	    mddev->new_chunk_sectors == mddev->chunk_sectors)
		return 0; /* nothing to do */
	if (mddev->bitmap)
		/* Cannot grow a bitmap yet */
		return -EBUSY;
	if (has_failed(conf))
		return -EINVAL;
	if (mddev->delta_disks < 0) {
@@ -5596,6 +5593,9 @@ static int raid5_start_reshape(struct mddev *mddev)
	if (!check_stripe_cache(mddev))
		return -ENOSPC;

	if (has_failed(conf))
		return -EINVAL;

	rdev_for_each(rdev, mddev) {
		if (!test_bit(In_sync, &rdev->flags)
		    && !test_bit(Faulty, &rdev->flags))