]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: save error info to sb through journal if available
authorJan Kara <jack@suse.cz>
Wed, 16 Dec 2020 10:18:40 +0000 (11:18 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 22 Dec 2020 18:08:46 +0000 (13:08 -0500)
commit91b364ecaed2be6d66aeec6672ecdb4636e15b80
treefb4a69fdb7397bf96f8dc49afa6774bde935544c
parent753640b931971dee04d097cbd687317bf0f37801
ext4: save error info to sb through journal if available

If journalling is still working at the moment we get to writing error
information to the superblock we cannot write directly to the superblock
as such write could race with journalled update of the superblock and
cause journal checksum failures, writing inconsistent information to the
journal or other problems. We cannot journal the superblock directly
from the error handling functions as we are running in uncertain context
and could deadlock so just punt journalled superblock update to a
workqueue.

Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20201216101844.22917-5-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c