Linux EXT4 FS development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Zhang Yi" <yi.zhang@huaweicloud.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH v3 2/3] mm/truncate: align truncation boundaries to mapping minimum folio order
Date: Wed, 16 Sep 2026 09:42:23 +0000	[thread overview]
Message-ID: <20260916094223.A24D81F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260916092450.654408-3-yi.zhang@huaweicloud.com>

> From: Zhang Yi <yi.zhang@huawei.com>
> 
> When the mapping has a non-zero minimum folio order (min_order),
> folio_split() stops at min_order instead of order 0, so the sub-folio
> containing a split point stays aligned to 1 << min_order rather than to
> a single page. The original boundaries were based on page granularity,
> so either boundary could land inside the min_order chunk at its edge,
> and the truncation loop would drop that whole chunk, valid out-of-range
> tail included.
> 
> For example, a 64K (order-4) folio with min_order = 2 (16K) punched from
> offset 0 to 36K:
> 
>   split @p0 -> [p0-p3, p4-p7, p8-p15]         # non-uniform, min_order
>   folio2 = p8-p15           # straddles: p8 in range, p9-p15 tail valid
> [ ... ]
> 
> Reported-by: Joanne Koong <joannelkoong@gmail.com>
> Link: https://lore.kernel.org/linux-mm/CAJnrk1bQYUe6+1ryyJur5EEnZYrC+_5AYsy=OWzVRgD4202y1g@mail.gmail.com/
> Fixes: e220917fa5077 ("mm: split a folio in minimum folio order chunks")
> Signed-off-by: Zhang Yi <yi.zhang@huawei.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260916092450.654408-1-yi.zhang@huaweicloud.com?part=2


  reply	other threads:[~2026-09-16  9:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16  9:24 [PATCH v3 0/3] mm/truncate: fix data loss when truncating straddling large folios Zhang Yi
2026-09-16  9:24 ` [PATCH v3 1/3] mm/truncate: fix data loss when splitting straddling large folios fails Zhang Yi
2026-09-16  9:45   ` sashiko-bot
2026-09-16 12:02   ` Jan Kara
2026-09-16 18:03     ` Zi Yan
2026-09-17 11:38       ` Zhang Yi
2026-09-17 12:03         ` Zhang Yi
2026-09-21  9:05           ` Jan Kara
2026-09-22  1:11             ` Zhang Yi
2026-09-16 17:38   ` Brian Foster
2026-09-17 11:48     ` Zhang Yi
2026-09-16  9:24 ` [PATCH v3 2/3] mm/truncate: align truncation boundaries to mapping minimum folio order Zhang Yi
2026-09-16  9:42   ` sashiko-bot [this message]
2026-09-16 21:14   ` Zi Yan
2026-09-17 12:32     ` Zhang Yi
2026-09-16  9:24 ` [PATCH v3 3/3] mm/truncate: clarify return value of truncate_inode_partial_folio() Zhang Yi
2026-09-16  9:45   ` sashiko-bot

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=20260916094223.A24D81F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tytso@mit.edu \
    --cc=yi.zhang@huaweicloud.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