Linux-ext4 Archive on lore.kernel.org
 help / color / Atom feed
From: "zhangyi (F)" <yi.zhang@huawei.com>
To: Jan Kara <jack@suse.cz>, <tytso@mit.edu>
Cc: <linux-ext4@vger.kernel.org>, <jack@suse.com>,
	<adilger.kernel@dilger.ca>, <liangyun2@huawei.com>,
	<luoshijie1@huawei.com>
Subject: Re: [PATCH v3 3/4] jbd2: make sure ESHUTDOWN to be recorded in the journal superblock
Date: Thu, 5 Dec 2019 09:23:19 +0800
Message-ID: <1f8eb86e-53c0-a547-a1e5-b7411d36ac3e@huawei.com> (raw)
In-Reply-To: <20191204170528.GH8206@quack2.suse.cz>

On 2019/12/5 1:05, Jan Kara wrote:
> On Wed 04-12-19 20:46:13, zhangyi (F) wrote:
>> Commit fb7c02445c49 ("ext4: pass -ESHUTDOWN code to jbd2 layer") want
>> to allow jbd2 layer to distinguish shutdown journal abort from other
>> error cases. So the ESHUTDOWN should be taken precedence over any other
>> errno which has already been recoded after EXT4_FLAGS_SHUTDOWN is set,
>> but it only update errno in the journal suoerblock now if the old errno
>> is 0.
>>
>> Fixes: fb7c02445c49 ("ext4: pass -ESHUTDOWN code to jbd2 layer")
>> Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
> 
> Yeah, I think this is correct if I understand the logic correctly but I'd
> like Ted to have a look at this. Anyway, feel free to add:
> 
> Reviewed-by: Jan Kara <jack@suse.cz>
> 

Thanks for review.

Hi Ted, do you have time to look at this patch?

Thanks,
Yi.

> 
>> ---
>>  fs/jbd2/journal.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
>> index b2d6e7666d0f..93be6e0311da 100644
>> --- a/fs/jbd2/journal.c
>> +++ b/fs/jbd2/journal.c
>> @@ -2109,8 +2109,7 @@ static void __journal_abort_soft (journal_t *journal, int errno)
>>  
>>  	if (journal->j_flags & JBD2_ABORT) {
>>  		write_unlock(&journal->j_state_lock);
>> -		if (!old_errno && old_errno != -ESHUTDOWN &&
>> -		    errno == -ESHUTDOWN)
>> +		if (old_errno != -ESHUTDOWN && errno == -ESHUTDOWN)
>>  			jbd2_journal_update_sb_errno(journal);
>>  		return;
>>  	}
>> -- 
>> 2.17.2
>>


  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 12:46 [PATCH v3 0/4] ext4, jbd2: improve aborting progress zhangyi (F)
2019-12-04 12:46 ` [PATCH v3 1/4] jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record zhangyi (F)
2019-12-04 12:46 ` [PATCH v3 2/4] ext4, jbd2: ensure panic when aborting with zero errno zhangyi (F)
2019-12-04 12:52   ` Jan Kara
2019-12-04 12:46 ` [PATCH v3 3/4] jbd2: make sure ESHUTDOWN to be recorded in the journal superblock zhangyi (F)
2019-12-04 17:05   ` Jan Kara
2019-12-05  1:23     ` zhangyi (F) [this message]
2019-12-04 12:46 ` [PATCH v3 4/4] jbd2: clean __jbd2_journal_abort_hard() and __journal_abort_soft() zhangyi (F)
2019-12-04 17:05   ` Jan Kara

Reply instructions:

You may reply publically 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=1f8eb86e-53c0-a547-a1e5-b7411d36ac3e@huawei.com \
    --to=yi.zhang@huawei.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=jack@suse.com \
    --cc=jack@suse.cz \
    --cc=liangyun2@huawei.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=luoshijie1@huawei.com \
    --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

Linux-ext4 Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-ext4/0 linux-ext4/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-ext4 linux-ext4/ https://lore.kernel.org/linux-ext4 \
		linux-ext4@vger.kernel.org
	public-inbox-index linux-ext4

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-ext4


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git