]> git.baikalelectronics.ru Git - 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)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 15 Mar 2019 03:46:05 +0000 (23:46 -0400)
commit8ffe60cd05b7ecf729bffc9732108048873f6e62
tree4fc2321b1a4cae5ed6f34228cd2c04bf217efd32
parent1c723b0b1e4831f2b5f982fc7ead6e17179d5a55
ext4: avoid panic during forced reboot

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>
fs/ext4/super.c