]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
ext4: avoid panic during forced reboot
authorJan Kara <jack@suse.cz>
Fri, 15 Mar 2019 03:46:05 +0000 (23:46 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 2 Jul 2019 10:07:53 +0000 (12:07 +0200)
commit5030242cb2f61656a13b01d18cab8f69b0602efe
treef0a028e095d1d28188b00a3d19073220f6d00c9d
parent2444399a16613ef0121c174d3e73b3756430d7b1
ext4: avoid panic during forced reboot

BugLink: https://bugs.launchpad.net/bugs/1830906
[ Upstream commit 1dc1097ff60e4105216da7cd0aa99032b039a994 ]

When admin calls "reboot -f" - i.e., does a hard system reboot by
directly calling reboot(2) - ext4 filesystem mounted with errors=panic
can panic the system. This happens because the underlying device gets
disabled without unmounting the filesystem and thus some syscall running
in parallel to reboot(2) can result in the filesystem getting IO errors.

This is somewhat surprising to the users so try improve the behavior by
switching to errors=remount-ro behavior when the system is running
reboot(2).

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/ext4/super.c