From: Jaegeuk Kim <jaegeuk@kernel.org>
To: heyunlei <heyunlei@huawei.com>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 4/7] resize.f2fs: get latest free segments
Date: Thu, 3 Nov 2016 10:26:59 -0700 [thread overview]
Message-ID: <20161103172659.GA76013@jaegeuk> (raw)
In-Reply-To: <911fa82d-b2b8-5d0f-c469-09f39c9624a5@huawei.com>
On Thu, Nov 03, 2016 at 02:53:20PM +0800, heyunlei wrote:
>
> Hi, Kim
> On 2016/11/3 13:28, Jaegeuk Kim wrote:
> > The # of free segments can be changed by defragmentation.
> >
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> > fsck/resize.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fsck/resize.c b/fsck/resize.c
> > index 5dc73a8..4813de7 100644
> > --- a/fsck/resize.c
> > +++ b/fsck/resize.c
> > @@ -424,7 +424,7 @@ static void rebuild_checkpoint(struct f2fs_sb_info *sbi,
> > set_cp(overprov_segment_count, get_cp(overprov_segment_count) +
> > get_cp(rsvd_segment_count));
> >
> > - free_segment_count = get_cp(free_segment_count);
> > + free_segment_count = get_free_segments(sbi);
>
> f2fs_defragment will write a checkpoint and then update free_segment_count
> by get_free_segments(sbi)o<\f
Is it righto<\x1f
In f2fs_defragment(),
- flush_journal_entries()
- migrate_blocks()
- move_curseg_info()
- zero-journal_entries()
- write_curseg_info()
- flush_sit_entries()
- write_checkpoint()
- free_segment_count = get_free_segments()
- write cp pack
Since I can't catch your point, could you please explain in more detail?
>
> Thankso<\f
> > new_segment_count = get_newsb(segment_count_main) -
> > get_sb(segment_count_main);
> >
> >
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
next prev parent reply other threads:[~2016-11-03 17:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 5:28 [PATCH 1/7] defrag.f2fs: return error for no space case Jaegeuk Kim
2016-11-03 5:28 ` [PATCH 2/7] resize.f2fs: fix wrong end_blkaddr Jaegeuk Kim
2016-11-03 5:28 ` [PATCH 3/7] f2fs-tools: fix end block addres when finding free block Jaegeuk Kim
2016-11-03 5:28 ` [PATCH 4/7] resize.f2fs: get latest free segments Jaegeuk Kim
2016-11-03 6:53 ` heyunlei
2016-11-03 17:26 ` Jaegeuk Kim [this message]
2016-11-03 17:36 ` Jaegeuk Kim
2016-11-03 5:28 ` [PATCH 5/7] sload.f2fs: not support to find or add files in inline_dir directory Jaegeuk Kim
2016-11-03 5:28 ` [PATCH 6/7] f2fs-tools: determine cp_addr by sbi->cur_cp Jaegeuk Kim
2016-11-03 5:28 ` [PATCH 7/7] resize.f2fs: fill zeros for expanded ssa area 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=20161103172659.GA76013@jaegeuk \
--to=jaegeuk@kernel.org \
--cc=heyunlei@huawei.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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 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.