From: Christoph Hellwig <hch@infradead.org>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Christoph Hellwig <hch@infradead.org>, Qu Wenruo <wqu@suse.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: fix a race which can lead to unreported write failure
Date: Mon, 25 Sep 2023 02:20:13 -0700 [thread overview]
Message-ID: <ZRFQzT/Gro1OmnLI@infradead.org> (raw)
In-Reply-To: <ff3e9fc1-3c22-4645-8442-b08212a6c67f@gmx.com>
On Mon, Sep 25, 2023 at 06:47:50PM +0930, Qu Wenruo wrote:
> Sorry, I couldn't find out a hard guarantee to make
> btrfs_orig_write_end_io() to always be executed after
> btrfs_clone_write_end_io().
That is how bio_inc_remaining works. For each call to it you need
an additional bio_endio call to counter it before ->end_io is called.
So no matter how fast orig_bio is executed by the underlying
driver/hardware, btrfs_orig_write_end_io will only be called once
both orig_bio itself and any clone has completed.
next prev parent reply other threads:[~2023-09-25 9:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 4:59 [PATCH] btrfs: fix a race which can lead to unreported write failure Qu Wenruo
2023-09-25 8:57 ` Christoph Hellwig
2023-09-25 9:17 ` Qu Wenruo
2023-09-25 9:20 ` Christoph Hellwig [this message]
2023-09-25 9:39 ` Qu Wenruo
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=ZRFQzT/Gro1OmnLI@infradead.org \
--to=hch@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=wqu@suse.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