From: Donald Buczek <buczek@molgen.mpg.de>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
dm-devel@redhat.com, it+linux@molgen.mpg.de,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: ext4_writepages: jbd2_start: 5120 pages, ino 11; err -5
Date: Wed, 28 Sep 2022 12:10:43 +0200 [thread overview]
Message-ID: <302f2af1-eee8-95aa-91f5-55fe5cf8727f@molgen.mpg.de> (raw)
In-Reply-To: <YpY2o/GG8HWJHTdo@mit.edu>
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@molgen.mpg.de
Tel: +49 30 8413 1433
prev parent reply other threads:[~2022-09-28 10:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 15:19 Donald Buczek
2022-05-31 10:38 ` Jan Kara
2022-05-31 13:48 ` Donald Buczek
2022-05-31 15:39 ` Theodore Ts'o
2022-09-28 10:10 ` Donald Buczek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=302f2af1-eee8-95aa-91f5-55fe5cf8727f@molgen.mpg.de \
--to=buczek@molgen.mpg.de \
--cc=dm-devel@redhat.com \
--cc=it+linux@molgen.mpg.de \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®