All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <chao@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] mkfs.f2fs: update allocation policy for ro feature
Date: Fri, 30 Sep 2022 15:33:48 -0700	[thread overview]
Message-ID: <YzduzKQN3xTg1cqh@google.com> (raw)
In-Reply-To: <45e56fa9-de7a-7858-f032-4433adb2b021@kernel.org>

On 09/30, Chao Yu wrote:
> On 2022/9/30 2:27, Jaegeuk Kim wrote:
> > On 09/28, Chao Yu wrote:
> > > On 2022/9/28 11:15, Jaegeuk Kim wrote:
> > > > On 09/28, Chao Yu wrote:
> > > > > On 2022/9/28 0:40, Jaegeuk Kim wrote:
> > > > > > On 09/25, Chao Yu wrote:
> > > > > > > Update allocation policy for ro feature:
> > > > > > > - hot_data: allocating blocks by LBA ascending order
> > > > > > > - hot_node: allocating blocks by LBA descending order
> > > > > > 
> > > > > > This will increase the RO image size.
> > > > > 
> > > > > Shouldn't RO image has fixed-size during mkfs?
> > > > 
> > > > First run gives the reduced size information, and second round makes the image
> > > > with the required size.
> > > 
> > > I didn't get it, in which step it may increase the RO image size?
> > > 
> > > IIUC, after we apply this patch, reduced size information won't change due
> > > to that after sload in first run, total used block count should be fixed?
> > 
> > First run fills the data and leaves the maximum LBA touched in the image. Then,
> 
> How about caclulating required size w/ total used blocks rather than maximum LBA?

Do you think that can give the smallest size for the image?

> 
> Thanks,
> 
> > it'll resize the image file and run again with the smallest image.
> > 
> > > 
> > > Thanks,
> > > 
> > > > 
> > > > > 
> > > > > > 
> > > > > > > 
> > > > > > > Signed-off-by: Chao Yu <chao@kernel.org>
> > > > > > > ---
> > > > > > >     mkfs/f2fs_format.c | 4 ++--
> > > > > > >     1 file changed, 2 insertions(+), 2 deletions(-)
> > > > > > > 
> > > > > > > diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
> > > > > > > index 40ac589..8d0f410 100644
> > > > > > > --- a/mkfs/f2fs_format.c
> > > > > > > +++ b/mkfs/f2fs_format.c
> > > > > > > @@ -544,10 +544,10 @@ static int f2fs_prepare_super_block(void)
> > > > > > >     	}
> > > > > > >     	if (c.feature & cpu_to_le32(F2FS_FEATURE_RO)) {
> > > > > > > -		c.cur_seg[CURSEG_HOT_NODE] = 0;
> > > > > > > +		c.cur_seg[CURSEG_HOT_NODE] = last_section(last_zone(total_zones));
> > > > > > >     		c.cur_seg[CURSEG_WARM_NODE] = 0;
> > > > > > >     		c.cur_seg[CURSEG_COLD_NODE] = 0;
> > > > > > > -		c.cur_seg[CURSEG_HOT_DATA] = 1;
> > > > > > > +		c.cur_seg[CURSEG_HOT_DATA] = 0;
> > > > > > >     		c.cur_seg[CURSEG_COLD_DATA] = 0;
> > > > > > >     		c.cur_seg[CURSEG_WARM_DATA] = 0;
> > > > > > >     	} else if (c.heap) {
> > > > > > > -- 
> > > > > > > 2.36.1


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2022-09-30 22:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25  5:58 [f2fs-dev] [PATCH] mkfs.f2fs: update allocation policy for ro feature Chao Yu
2022-09-27 16:40 ` Jaegeuk Kim
2022-09-28  1:48   ` Chao Yu
2022-09-28  3:15     ` Jaegeuk Kim
2022-09-28 11:59       ` Chao Yu
2022-09-29 18:27         ` Jaegeuk Kim
2022-09-29 22:57           ` Chao Yu
2022-09-30 22:33             ` Jaegeuk Kim [this message]
2022-10-01  0:26               ` Chao Yu
2022-10-03  1:06                 ` Jaegeuk Kim
2022-10-06 15:22                   ` Chao Yu
2022-09-28  2:11   ` [f2fs-dev] 答复: " zhangqilong via Linux-f2fs-devel

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=YzduzKQN3xTg1cqh@google.com \
    --to=jaegeuk@kernel.org \
    --cc=chao@kernel.org \
    --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.