The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Daeho Jeong <daeho43@gmail.com>
Cc: chao@kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com,
	Daeho Jeong <daehojeong@google.com>
Subject: Re: [f2fs-dev] [PATCH v6] f2fs: support dynamic reserve/release for device aliasing
Date: Thu, 6 Aug 2026 10:42:57 +0800	[thread overview]
Message-ID: <246b5851-2cca-4ea8-b050-3cf9e5c76917@kernel.org> (raw)
In-Reply-To: <CACOAw_ynod+nrwrqfoqLK4NOPvVTHoG+3z5FFcF-YByJ7uUEzw@mail.gmail.com>

On 8/6/26 00:43, Daeho Jeong wrote:
> On Tue, Aug 4, 2026 at 6:20 PM Chao Yu <chao@kernel.org> wrote:
>>
>> On 7/30/26 23:46, Daeho Jeong wrote:
>>> From: Daeho Jeong <daehojeong@google.com>
>>>
>>> This patch adds a dynamic management feature to the existing device
>>> aliasing functionality. It allows users to dynamically reserve or
>>> release specific devices from the filesystem's free pool at runtime
>>> through new ioctls.
>>>
>>> To support this, three new ioctls are introduced:
>>> - F2FS_IOC_RESERVE_DEV_ALIAS: This reclaims the space occupied by a
>>>   device aliasing file. It first performs a capacity check, resets GC
>>>   victim information for the target range, marks the segments as in-use
>>>   to prevent new allocations, and then triggers GC to migrate existing
>>>   valid data out of the range. Finally, it reserves these blocks in the
>>>   SIT to effectively exclude the device from the usable capacity.
>>>
>>> - F2FS_IOC_RELEASE_DEV_ALIAS: This releases the reserved space of a
>>>   previously reserved device aliasing file. It truncates the blocks
>>>   associated with the file, which makes them available for general
>>>   filesystem allocation again.
>>>
>>> - F2FS_IOC_GET_DEV_ALIAS_STATUS: This retrieves the current aliasing
>>>   status of a device aliasing file, returning whether the file is
>>>   released (inactive alias) or reserved (active alias, with blocks
>>>   fully allocated on the device).
>>>
>>> Signed-off-by: Daeho Jeong <daehojeong@google.com>
>> Reviewed-by: Chao Yu <chao@kernel.org>
>>
>> Thanks,
> 
> Oh, I overlooked that ei.blk includes the segment0_blkaddr offset (the
> metadata area), so `ei.blk % BLKS_PER_SEC(sbi)` incorrectly checked
> alignment from block 0 rather than the segment area start.

Oh, I may missed this...

> 
> I am going to fix it using the `GET_SEGOFF_FROM_SEG0()` macro:
> if ((GET_SEGOFF_FROM_SEG0(sbi, ei.blk) % BLKS_PER_SEC(sbi)) ||
> (ei.len % BLKS_PER_SEC(sbi))) {
> ...
> }

Looks fine to me.

Thanks,

> 
> Thanks,


      reply	other threads:[~2026-08-06  2:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 15:46 [PATCH v6] f2fs: support dynamic reserve/release for device aliasing Daeho Jeong
2026-08-03  2:00 ` [f2fs-dev] " Chao Yu
2026-08-03 16:18   ` Daeho Jeong
2026-08-04  0:42     ` Chao Yu
2026-08-04 17:08       ` Daeho Jeong
2026-08-05  1:19         ` Chao Yu
2026-08-05  1:20 ` Chao Yu
2026-08-05 16:43   ` Daeho Jeong
2026-08-06  2:42     ` Chao Yu [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=246b5851-2cca-4ea8-b050-3cf9e5c76917@kernel.org \
    --to=chao@kernel.org \
    --cc=daeho43@gmail.com \
    --cc=daehojeong@google.com \
    --cc=kernel-team@android.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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