mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
md: avoid possible spinning md thread at shutdown.
commit 0f62fb220a upstream.
If an md array with externally managed metadata (e.g. DDF or IMSM)
is in use, then we should not set safemode==2 at shutdown because:
1/ this is ineffective: user-space need to be involved in any 'safemode' handling,
2/ The safemode management code doesn't cope with safemode==2 on external metadata
and md_check_recover enters an infinite loop.
Even at shutdown, an infinite-looping process can be problematic, so this
could cause shutdown to hang.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1c0301d184
commit
658864cc2c
@@ -8481,7 +8481,8 @@ static int md_notify_reboot(struct notifier_block *this,
|
||||
if (mddev_trylock(mddev)) {
|
||||
if (mddev->pers)
|
||||
__md_stop_writes(mddev);
|
||||
mddev->safemode = 2;
|
||||
if (mddev->persistent)
|
||||
mddev->safemode = 2;
|
||||
mddev_unlock(mddev);
|
||||
}
|
||||
need_delay = 1;
|
||||
|
||||
Reference in New Issue
Block a user