public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Stephen Zhang <starzhangzsd@gmail.com>
Cc: Andreas Gruenbacher <agruenba@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	nvdimm@lists.linux.dev, virtualization@lists.linux.dev,
	linux-nvme@lists.infradead.org, gfs2@lists.linux.dev,
	ntfs3@lists.linux.dev, linux-xfs@vger.kernel.org,
	zhangshida@kylinos.cn
Subject: Re: [PATCH 1/9] block: fix data loss and stale date exposure problems during append write
Date: Thu, 27 Nov 2025 21:55:12 -0800	[thread overview]
Message-ID: <aSk5QFHzCwz97Xqw@infradead.org> (raw)
In-Reply-To: <CANubcdXzxPuh9wweeW0yjprsQRZuBWmJwnEBcihqtvk6n7b=bQ@mail.gmail.com>

On Fri, Nov 28, 2025 at 11:22:49AM +0800, Stephen Zhang wrote:
> Therefore, we could potentially change it to::
> 
>         if (bio->bi_status && !READ_ONCE(parent->bi_status))
>                 parent->bi_status = bio->bi_status;
> 
> But as you mentioned, the check might not be critical here. So ultimately,
> we can simplify it to:
> 
>         if (bio->bi_status)
>                 parent->bi_status = bio->bi_status;

It might make sense to just use cmpxchg.  See btrfs_bio_end_io as an
example (although it is operating on the btrfs_bio structure)


  reply	other threads:[~2025-11-28  5:55 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-21  8:17 Fix potential data loss and corruption due to Incorrect BIO Chain Handling zhangshida
2025-11-21  8:17 ` [PATCH 1/9] block: fix data loss and stale date exposure problems during append write zhangshida
2025-11-21  9:34   ` Johannes Thumshirn
2025-11-22  7:08     ` Stephen Zhang
2025-11-21 10:31   ` Christoph Hellwig
2025-11-21 16:13     ` Andreas Gruenbacher
2025-11-22  7:25       ` Stephen Zhang
2025-11-28  3:22       ` Stephen Zhang
2025-11-28  5:55         ` Christoph Hellwig [this message]
2025-11-28  6:26           ` Stephen Zhang
2025-11-22 12:15   ` Ming Lei
2025-11-21  8:17 ` [PATCH 2/9] block: export bio_chain_and_submit zhangshida
2025-11-21 10:32   ` Christoph Hellwig
2025-11-21 17:12   ` Andreas Gruenbacher
2025-11-22  7:02     ` Stephen Zhang
2025-11-21  8:17 ` [PATCH 3/9] gfs2: use bio_chain_and_submit for simplification zhangshida
2025-11-21  8:17 ` [PATCH 4/9] xfs: " zhangshida
2025-11-21  8:17 ` [PATCH 5/9] block: " zhangshida
2025-11-21  8:17 ` [PATCH 6/9] fs/ntfs3: " zhangshida
2025-11-21  8:17 ` [PATCH 7/9] zram: " zhangshida
2025-11-21  8:17 ` [PATCH 8/9] nvmet: fix the potential bug and " zhangshida
2025-11-21  8:17 ` [PATCH 9/9] nvdimm: " zhangshida
2025-11-21 10:37 ` Fix potential data loss and corruption due to Incorrect BIO Chain Handling Christoph Hellwig
2025-11-22  6:38   ` Stephen Zhang
2025-11-24  6:22     ` Christoph Hellwig
2025-11-27  7:05       ` Stephen Zhang
2025-11-27  7:14         ` Christoph Hellwig
2025-11-27  7:40           ` Gao Xiang
2025-11-27 14:46             ` Christoph Hellwig
2025-11-28  1:32               ` Stephen Zhang
2025-11-28  1:29           ` Stephen Zhang
2025-11-22  3:35 ` Ming Lei
2025-11-22  6:42   ` Stephen Zhang
2025-11-22  7:46     ` Andreas Gruenbacher
2025-11-22 12:01     ` Ming Lei
2025-11-22 14:56       ` Andreas Gruenbacher
2025-11-23  3:14         ` Stephen Zhang
2025-11-23 13:48         ` Ming Lei
2025-11-24  1:28           ` Stephen Zhang
2025-11-24  2:00             ` Stephen Zhang

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=aSk5QFHzCwz97Xqw@infradead.org \
    --to=hch@infradead.org \
    --cc=agruenba@redhat.com \
    --cc=gfs2@lists.linux.dev \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    --cc=nvdimm@lists.linux.dev \
    --cc=starzhangzsd@gmail.com \
    --cc=virtualization@lists.linux.dev \
    --cc=zhangshida@kylinos.cn \
    /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