diff --git a/drivers/md/md.c b/drivers/md/md.c index aeceedfc530b90b5da5b45e12ffdc9e4d665e16d..c6e44a836a53a5f10702d5e42ad0ba1a87622831 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2411,6 +2411,11 @@ static void md_update_sb(struct mddev * mddev, int force_change) int nospares = 0; int any_badblocks_changed = 0; + if (mddev->ro) { + if (force_change) + set_bit(MD_CHANGE_DEVS, &mddev->flags); + return; + } repeat: /* First make sure individual recovery_offsets are correct */ rdev_for_each(rdev, mddev) {