linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Sheng Yong <shengyong1@huawei.com>, jaegeuk@kernel.org
Cc: miaoxie@huawei.com, tony.zhangxiaobo@huawei.com,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: check total CP pack block count correctly
Date: Wed, 1 Aug 2018 18:26:12 +0800	[thread overview]
Message-ID: <d6af1f17-4c57-c6e4-47a5-07ea718a8f1b@huawei.com> (raw)
In-Reply-To: <2486a962-61cd-ebcc-fca9-42fe7d703e67@huawei.com>

On 2018/8/1 15:36, Sheng Yong wrote:
> 
> 
> On 2018/8/1 14:56, Chao Yu wrote:
>> Hi Sheng,
>>
>> On 2018/8/1 11:46, Sheng Yong wrote:
>>> Fixes: 652d19558a347 ('f2fs: fix to do sanity check with block address in main area')
>>> Reported-by: Zhang Xiaobo <tony.zhangxiaobo@huawei.com>
>>> Signed-off-by: Sheng Yong <shengyong1@huawei.com>
>>
>> That's my bad, and thanks for the fix.
>>
>> Do you mind merge this into buggy patch, since the patch has not been upstreamed
>> yet.
> 
> No, of course not :)
> 
> Thanks,
> 
>>
>> Thanks,
>>
>>> ---
>>>   fs/f2fs/checkpoint.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
>>> index 3587aa53dc90..c32ee10a1384 100644
>>> --- a/fs/f2fs/checkpoint.c
>>> +++ b/fs/f2fs/checkpoint.c
>>> @@ -809,7 +809,7 @@ static struct page *validate_checkpoint(struct f2fs_sb_info *sbi,
>>>   		goto invalid_cp1;
>>>   
>>>   	if (le32_to_cpu(cp_block->cp_pack_total_block_count) >
>>> -					sbi->log_blocks_per_seg) {
>>> +					sbi->blocks_per_seg - 1) {

actually, cp_pack_total_block_count can be sbi->blocks_per_seg?

Thanks,

>>>   		f2fs_msg(sbi->sb, KERN_WARNING,
>>>   			"invalid cp_pack_total_block_count:%u",
>>>   			le32_to_cpu(cp_block->cp_pack_total_block_count));
>>>
>>
>>
>> .
>>
> 
> 
> .
> 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

  reply	other threads:[~2018-08-01 10:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01  3:46 [PATCH] f2fs: check total CP pack block count correctly Sheng Yong
2018-08-01  6:56 ` Chao Yu
2018-08-01  7:36   ` Sheng Yong
2018-08-01 10:26     ` Chao Yu [this message]
2018-08-01 10:58       ` Sheng Yong

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=d6af1f17-4c57-c6e4-47a5-07ea718a8f1b@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=miaoxie@huawei.com \
    --cc=shengyong1@huawei.com \
    --cc=tony.zhangxiaobo@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).