From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: Wang Sheng-Hui <shhuiw@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] f2fs: make sanity_check_ckpt more strict
Date: Tue, 02 Jul 2013 08:23:37 +0900 [thread overview]
Message-ID: <1372721017.736.11.camel@kjgkr> (raw)
In-Reply-To: <51CDAA82.40401@gmail.com>
Hi,
2013-06-28 (금), 23:23 +0800, Wang Sheng-Hui:
> In mkfs, we have check:
> if ((le32_to_cpu(super_block.segment_count_main) - 2) <
> config.reserved_segments) {
This is not the sanity check flow.
It's just to check whether the volume size is enoughly large or not.
>
> In super.c/sanity_check_ckpt, we should make the check as strict
> as mkfs.
> Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
> ---
> fs/f2fs/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 8555f7d..b64f38a 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -448,7 +448,7 @@ static int sanity_check_ckpt(struct f2fs_sb_info *sbi)
> fsmeta = le32_to_cpu(raw_super->segment_count_ckpt);
> fsmeta += le32_to_cpu(raw_super->segment_count_sit);
> fsmeta += le32_to_cpu(raw_super->segment_count_nat);
> - fsmeta += le32_to_cpu(ckpt->rsvd_segment_count);
> + fsmeta += le32_to_cpu(ckpt->rsvd_segment_count) + 2;
NAK.
The fsmeta is used to check whether total segment count is matched to
the sum of each area's segment counts.
Thanks,
--
Jaegeuk Kim
Samsung
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2013-07-01 23:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-28 15:23 [PATCH] f2fs: make sanity_check_ckpt more strict Wang Sheng-Hui
2013-07-01 23:23 ` Jaegeuk Kim [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=1372721017.736.11.camel@kjgkr \
--to=jaegeuk.kim@samsung.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=shhuiw@gmail.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).