mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhang Yi <yi.zhang@huaweicloud.com>
To: "Jose Fernandez (Anthropic)" <jose.fernandez@linux.dev>,
	Ojaswin Mujoo <ojaswin@linux.ibm.com>,
	Theodore Ts'o <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>, Baokun Li <libaokun@linux.alibaba.com>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
	guolingxing <guolingxing@tju.edu.cn>,
	Josef Bacik <josef@toxicpanda.com>,
	Chris Mason <mason@kernel.org>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	regressions@lists.linux.dev
Subject: Re: [REGRESSION] ext4: silent data loss when a split at I/O completion gets ENOSPC
Date: Sat, 28 Nov 2026 09:08:50 +0800	[thread overview]
Message-ID: <99ddd05c-7e38-4f8a-bd9e-fe87d1d959af@huaweicloud.com> (raw)
In-Reply-To: <20261127-jf-ext4-enospc-reply-zhangyi-r4-3-59ba31e6e023@linux.dev>

On 11/28/2026 1:45 AM, Jose Fernandez (Anthropic) wrote:
> On Tue, Nov 24, 2026 Zhang Yi wrote:
>> My idea is to make this a real reservation of currently allocatable
>> clusters rather than just a counter check. We can subtract
>> sbi->s_mb_free_pending from free_clusters in ext4_has_free_clusters().
> 
> This makes sense to me.
> 
>> However, the probability of returning ENOSPC for pure append writes
>> increases by about 10%.
> 
> Our agents tried a close variant of it on mainline, with an exception
> for EXT4_MB_USE_RESERVED. The reproducer lost 0 of 72 files instead of
> 32 of 72. But write() got ENOSPC on 54 of 540 delalloc files, against
> none without it, with the filesystem at most about half full. The
> writers ran as root. Is your 10% before or after
> ext4_should_retry_alloc() gives up? Ours is after.

Yes, my test results match yours. Writes to preallocated files no longer
lose data or return ENOSPC, while the probability of delalloc writes
returning ENOSPC after ext4_should_retry_alloc() gives up increases from
0 to about 10%.

Thanks,
Yi.

> 
> We can test the patch once it is posted.
> 
> - Jose


  reply	other threads:[~2026-11-28  1:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  2:27 Jose Fernandez (Anthropic)
2026-11-17 11:37 ` Zhang Yi
2026-11-17 14:23   ` Jose Fernandez (Anthropic)
2026-11-18  3:44     ` Zhang Yi
2026-11-18 14:06       ` Jose Fernandez (Anthropic)
2026-11-24  4:49         ` Zhang Yi
2026-11-24 15:53           ` Jan Kara
2026-11-25  1:24             ` Zhang Yi
2026-11-27 17:45           ` Jose Fernandez (Anthropic)
2026-11-28  1:08             ` Zhang Yi [this message]
2026-11-18  7:55   ` Ojaswin Mujoo
2026-11-18 10:48     ` Zhang Yi
2026-11-18 18:34       ` Ojaswin Mujoo

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=99ddd05c-7e38-4f8a-bd9e-fe87d1d959af@huaweicloud.com \
    --to=yi.zhang@huaweicloud.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=guolingxing@tju.edu.cn \
    --cc=jack@suse.cz \
    --cc=jose.fernandez@linux.dev \
    --cc=josef@toxicpanda.com \
    --cc=libaokun@linux.alibaba.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=regressions@lists.linux.dev \
    --cc=ritesh.list@gmail.com \
    --cc=tytso@mit.edu \
    /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®