On 5/31/22 5:39 PM, Theodore Ts'o wrote: > Hmmm..... I think this patch should fix your issues. Thanks a lot. Unfortunately, it didn't, I still occasionally get [368259.560885] EXT4-fs (dm-0): ext4_writepages: jbd2_start: 344 pages, ino 279244; err -5 D. > > 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); > -- Donald Buczek buczek@xxxxxxxxxxxxx Tel: +49 30 8413 1433