All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Julian Sun" <sunjunchao@bytedance.com>, linux-ext4@vger.kernel.org
Cc: tytso@mit.edu
Subject: Re: [PATCH v3 3/3] ext4: use atomic bitops for io_end flags
Date: Mon, 16 Nov 2026 06:59:12 +0000	[thread overview]
Message-ID: <sashiko-outbox-216356@kernel.org> (raw)
In-Reply-To: <20261116064749.194146-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
> [ ... ]
> 
> Fixes: e856f93e0fb2 ("ext4: do not convert the unwritten extents if data writeback fails")
> Cc: stable@vger.kernel.org
> Reviewed-by: Zhang Yi <yi.zhang@huaweicloud.com>
> Signed-off-by: Julian Sun <sunjunchao@bytedance.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261116064404.189911-1-sunjunchao@bytedance.com?part=3


      reply	other threads:[~2026-11-16  6:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  6:44 [PATCH v3 0/3] ext4: fix buffered writeback error handling Julian Sun
2026-11-16  6:44 ` [PATCH v3 1/3] ext4: fix a race between partial writeback and truncation Julian Sun
2026-11-16  7:02   ` sashiko-bot
2026-11-16  6:47 ` [PATCH v3 2/3] ext4: submit mapped buffers after fatal mapping errors Julian Sun
2026-11-16  7:24   ` sashiko-bot
2026-11-16  6:47 ` [PATCH v3 3/3] ext4: use atomic bitops for io_end flags Julian Sun
2026-11-16  6:59   ` sashiko-bot [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=sashiko-outbox-216356@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.