lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YpY2o/GG8HWJHTdo@mit.edu>
Date:   Tue, 31 May 2022 11:39:15 -0400
From:   "Theodore Ts'o" <tytso@....edu>
To:     Donald Buczek <buczek@...gen.mpg.de>
Cc:     Jan Kara <jack@...e.cz>, linux-ext4@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, dm-devel@...hat.com,
        it+linux@...gen.mpg.de,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: ext4_writepages: jbd2_start: 5120 pages, ino 11; err -5

Hmmm..... I think this patch should fix your issues.

If the journal has been aborted (which happens as part of the
shutdown, we will never write out the commit block --- so it should be
fine to skip the writeback of any dirty inodes in data=ordered mode.

BTW, if you know that the file system is going to get nuked in this
way all the time, so you never care about file system after it is shut
down, you could mount the file system with the mount option
data=writeback.

       	      	      	    		- Ted


diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 8ff4c6545a49..2e18211121f6 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -542,7 +542,10 @@ static int ext4_journalled_submit_inode_data_buffers(struct jbd2_inode *jinode)
 static int ext4_journal_submit_inode_data_buffers(struct jbd2_inode *jinode)
 {
 	int ret;
+	journal_t *journal = EXT4_SB(jinode->i_vfs_inode->i_sb)->s_journal;
 
+	if (!journal || is_journal_aborted(journal))
+		return 0;
 	if (ext4_should_journal_data(jinode->i_vfs_inode))
 		ret = ext4_journalled_submit_inode_data_buffers(jinode);
 	else
@@ -554,7 +557,10 @@ static int ext4_journal_submit_inode_data_buffers(struct jbd2_inode *jinode)
 static int ext4_journal_finish_inode_data_buffers(struct jbd2_inode *jinode)
 {
 	int ret = 0;
+	journal_t *journal = EXT4_SB(jinode->i_vfs_inode->i_sb)->s_journal;
 
+	if (!journal || is_journal_aborted(journal))
+		return 0;
 	if (!ext4_should_journal_data(jinode->i_vfs_inode))
 		ret = jbd2_journal_finish_inode_data_buffers(jinode);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ