From: Jan Kara <jack@suse.cz> To: harshad shirwadkar <harshadshirwadkar@gmail.com> Cc: Jan Kara <jack@suse.cz>, Ted Tso <tytso@mit.edu>, Ext4 Developers List <linux-ext4@vger.kernel.org> Subject: Re: [PATCH 08/12] ext4: Combine ext4_handle_error() and save_error_info() Date: Wed, 16 Dec 2020 11:11:47 +0100 [thread overview] Message-ID: <20201216101147.GB21258@quack2.suse.cz> (raw) In-Reply-To: <CAD+ocbwLVsjrB1HRsOm-mD6zm+1Et1C5FcwcGvNmt-AkuZo4Uw@mail.gmail.com> On Mon 14-12-20 11:23:04, harshad shirwadkar wrote: > On Fri, Nov 27, 2020 at 3:38 AM Jan Kara <jack@suse.cz> wrote: > > > > save_error_info() is always called together with ext4_handle_error(). > > Combine them into a single call and move unconditional bits out of > > save_error_info() into ext4_handle_error(). > > > > Signed-off-by: Jan Kara <jack@suse.cz> > > --- > > fs/ext4/super.c | 31 +++++++++++++++---------------- > > 1 file changed, 15 insertions(+), 16 deletions(-) > > > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > > index 2d7dc0908cdd..73a09b73fc11 100644 > > --- a/fs/ext4/super.c > > +++ b/fs/ext4/super.c > > @@ -592,9 +592,6 @@ static void __save_error_info(struct super_block *sb, int error, > > { > > struct ext4_sb_info *sbi = EXT4_SB(sb); > > > > - EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; > > - if (bdev_read_only(sb->s_bdev)) > > - return; > > /* We default to EFSCORRUPTED error... */ > > if (error == 0) > > error = EFSCORRUPTED; ... > > @@ -944,13 +943,13 @@ __acquires(bitlock) > > if (test_opt(sb, ERRORS_CONT)) { > > if (test_opt(sb, WARN_ON_ERROR)) > > WARN_ON_ONCE(1); > > + EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; > Since you moved the bdev_read_only() check from __save_error_info to > ext4_handle_error(), should we add that check here? Thanks for the review! Now that I'm looking at it, you're probably right it would be safer. That being said I don't think it really matters: a) Because I don't think this function can get called on read-only bdev b) Because functions processing the work item will find out the sb is read-only and won't do anything. But it's really wasted work. I can see Ted didn't merge this patch yet. So I'll resend the series from this patch because after fixing this it required a bit of rebasing. Also I have two more additional fixes in the series based on Andreas' feedback. Thanks again for looking into the series! Honza -- Jan Kara <jack@suse.com> SUSE Labs, CR
next prev parent reply other threads:[~2020-12-16 10:12 UTC|newest] Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-27 11:33 [PATCH 00/12] ext4: Various fixes of ext4 handling of fs errors Jan Kara 2020-11-27 11:33 ` [PATCH 01/12] ext4: Don't remount read-only with errors=continue on reboot Jan Kara 2020-11-29 21:33 ` Andreas Dilger 2020-12-16 4:59 ` Theodore Y. Ts'o 2020-11-27 11:33 ` [PATCH 02/12] ext4: Remove redundant sb checksum recomputation Jan Kara 2020-11-29 22:11 ` Andreas Dilger 2020-11-30 10:59 ` Jan Kara 2020-12-16 5:01 ` Theodore Y. Ts'o 2020-11-27 11:33 ` [PATCH 03/12] ext4: Standardize error message in ext4_protect_reserved_inode() Jan Kara 2020-11-29 21:39 ` Andreas Dilger 2020-12-16 5:04 ` Theodore Y. Ts'o 2020-11-27 11:33 ` [PATCH 04/12] ext4: Make ext4_abort() use __ext4_error() Jan Kara 2020-11-29 22:12 ` Andreas Dilger 2020-12-16 5:07 ` Theodore Y. Ts'o 2020-11-27 11:33 ` [PATCH 05/12] ext4: Move functions in super.c Jan Kara 2020-11-29 22:13 ` Andreas Dilger 2020-12-16 5:09 ` Theodore Y. Ts'o 2020-11-27 11:33 ` [PATCH 06/12] ext4: Simplify ext4 error translation Jan Kara 2020-11-29 21:57 ` Andreas Dilger 2020-12-16 5:11 ` Theodore Y. Ts'o 2020-11-27 11:34 ` [PATCH 07/12] ext4: Defer saving error info from atomic context Jan Kara 2020-12-16 5:31 ` Theodore Y. Ts'o 2020-12-16 5:40 ` Theodore Y. Ts'o 2020-12-16 9:56 ` Jan Kara 2020-11-27 11:34 ` [PATCH 08/12] ext4: Combine ext4_handle_error() and save_error_info() Jan Kara 2020-12-14 19:23 ` harshad shirwadkar 2020-12-16 10:11 ` Jan Kara [this message] 2020-12-16 10:24 ` Jan Kara 2020-11-27 11:34 ` [PATCH 09/12] ext4: Drop sync argument of ext4_commit_super() Jan Kara 2020-12-14 19:25 ` harshad shirwadkar 2020-11-27 11:34 ` [PATCH 10/12] ext4: Protect superblock modifications with a buffer lock Jan Kara 2020-11-27 11:34 ` [PATCH 11/12] ext4: Save error info to sb through journal if available Jan Kara 2020-11-27 11:34 ` [PATCH 12/12] ext4: Use sbi instead of EXT4_SB(sb) in ext4_update_super() Jan Kara 2020-12-14 19:07 ` [PATCH 00/12] ext4: Various fixes of ext4 handling of fs errors harshad shirwadkar
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=20201216101147.GB21258@quack2.suse.cz \ --to=jack@suse.cz \ --cc=harshadshirwadkar@gmail.com \ --cc=linux-ext4@vger.kernel.org \ --cc=tytso@mit.edu \ --subject='Re: [PATCH 08/12] ext4: Combine ext4_handle_error() and save_error_info()' \ /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
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.