From: sashiko-bot@kernel.org
To: "Julian Sun" <sunjunchao@bytedance.com>, linux-ext4@vger.kernel.org
Cc: tytso@mit.edu
Subject: Re: [PATCH 6/6] ext4: use atomic bitops for io_end flags
Date: Thu, 22 Oct 2026 15:17:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-181686@kernel.org> (raw)
In-Reply-To: <20261022151239.2981745-2-sunjunchao@bytedance.com>
> Before EXT4_IO_END_FAILED was added, the writeback thread set
> EXT4_IO_END_UNWRITTEN and final completion cleared it after the last
> io_end reference was dropped. Adding EXT4_IO_END_FAILED introduced a
> concurrent writer in failed-bio completion. Successful bio completions
> do not update the flags.
>
> An io_end can cover already-mapped folios submitted before a later
> unwritten extent is mapped. An earlier bio can fail while writeback
> first sets UNWRITTEN. The non-atomic updates can then lose a bit:
>
> Bio completion Writeback thread
> -------------- ----------------
> read flag = 0
> attach reserved handle to io_end
> flag |= UNWRITTEN
> [ ... ]
> Use atomic bit operations to fix the race.
>
> Fixes: e856f93e0fb2 ("ext4: do not convert the unwritten extents if data writeback fails")
> Cc: stable@vger.kernel.org
> Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261022145241.2950379-1-sunjunchao@bytedance.com?part=6
next prev parent reply other threads:[~2026-10-22 15:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 14:52 [PATCH 0/6] ext4: fix buffered writeback error handling Julian Sun
2026-10-22 14:52 ` [PATCH 1/6] ext4: move extent mapping error handling out of the loop Julian Sun
2026-10-22 15:15 ` sashiko-bot
2026-10-22 14:52 ` [PATCH 2/6] ext4: submit mapped buffers when io_end_vec allocation fails Julian Sun
2026-10-22 15:25 ` sashiko-bot
2026-10-22 14:52 ` [PATCH 3/6] ext4: prevent stale data exposure after fatal mapping errors Julian Sun
2026-10-22 15:40 ` sashiko-bot
2026-10-22 15:02 ` [PATCH 4/6] ext4: put folio on partial writeback validation failure Julian Sun
2026-10-22 15:15 ` sashiko-bot
2026-10-22 15:12 ` [PATCH 5/6] ext4: report unwritten extent conversion errors to fsync Julian Sun
2026-10-22 15:12 ` [PATCH 6/6] ext4: use atomic bitops for io_end flags Julian Sun
2026-10-22 15:17 ` sashiko-bot [this message]
2026-10-22 15:19 ` [PATCH 5/6] ext4: report unwritten extent conversion errors to fsync sashiko-bot
2026-10-22 16:05 ` [PATCH 0/6] ext4: fix buffered writeback error handling Theodore Tso
2026-10-23 2:36 ` Zhang Yi
2026-10-23 3:43 ` 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=sashiko-outbox-181686@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sunjunchao@bytedance.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 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.