From: Sheng Yong <shengyong1@huawei.com>
To: linux-f2fs-devel@lists.sourceforge.net, jaegeuk@kernel.org,
yuchao0@huawei.com
Subject: [PATCH 2/2] fsck.f2fs: do not check the first seg in a sec in find_next_free_block
Date: Mon, 24 Oct 2016 10:16:04 +0800 [thread overview]
Message-ID: <20161024021604.5218-2-shengyong1@huawei.com> (raw)
In-Reply-To: <20161024021604.5218-1-shengyong1@huawei.com>
The first segment is already checked, so there is no need to check it
again if we want to make sure the whole section is freed.
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
---
fsck/mount.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck/mount.c b/fsck/mount.c
index ca7f6dd..0a47bf7 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -1573,7 +1573,7 @@ int find_next_free_block(struct f2fs_sb_info *sbi, u64 *to, int left, int type)
struct seg_entry *se2;
unsigned int i;
- for (i = 0; i < sbi->segs_per_sec; i++) {
+ for (i = 1; i < sbi->segs_per_sec; i++) {
se2 = get_seg_entry(sbi, segno + i);
if (se2->valid_blocks)
break;
--
2.10.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
next prev parent reply other threads:[~2016-10-24 2:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 2:16 [PATCH 1/2] dump/fsck: convert encrypted file name Sheng Yong
2016-10-24 2:16 ` Sheng Yong [this message]
2016-10-24 3:47 ` Sheng Yong
2016-10-26 1:18 ` Jaegeuk Kim
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=20161024021604.5218-2-shengyong1@huawei.com \
--to=shengyong1@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=yuchao0@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).