mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Hungyu Lin <dennylin0707@gmail.com>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] f2fs: preserve 64-bit FITRIM minimum lengths
Date: Mon, 2 Nov 2026 10:11:53 +0800	[thread overview]
Message-ID: <0696ac2d-58a2-42d4-9b5e-6a353f772f71@kernel.org> (raw)
In-Reply-To: <20261031233935.9600-1-dennylin0707@gmail.com>

On 11/1/26 07:39, Hungyu Lin wrote:
> The FITRIM minimum length is a 64-bit byte count. f2fs_ioc_fitrim()
> narrows it to unsigned int while applying the device granularity, so a
> minimum of 4 GiB becomes the device granularity. fstrim can consequently
> discard free extents smaller than the requested minimum.
> 
> Use u64 when applying the device granularity. The checkpoint's
> trim_minlen already retains the 64-bit block count; also widen the
> discard policy field and its initializer argument so larger minimums
> are not truncated when passed to the issue and wait paths.
> 

Cc: stable@vger.kernel.org

> Fixes: 4b2fecc84655 ("f2fs: introduce FITRIM in f2fs_ioctl")
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

      reply	other threads:[~2026-11-02  2:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-31 23:39 Hungyu Lin
2026-11-02  2:11 ` 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=0696ac2d-58a2-42d4-9b5e-6a353f772f71@kernel.org \
    --to=chao@kernel.org \
    --cc=dennylin0707@gmail.com \
    --cc=jaegeuk@kernel.org \
    --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

all inboxes | Powered by JetHome®