From: Sasha Levin <sashal@kernel.org>
To: Ruohan Lan <ruohanlan@aliyun.com>
Cc: Sasha Levin <sashal@kernel.org>,
stable@vger.kernel.org, linux-btrfs@vger.kernel.org,
Naohiro Aota <naohiro.aota@wdc.com>,
Christoph Hellwig <hch@lst.de>, David Sterba <dsterba@suse.com>,
Qu Wenruo <wqu@suse.com>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: Re: [PATCH 6.6.y 0/2] backport to fix error propagation of split bios
Date: Mon, 20 Apr 2026 09:21:01 -0400 [thread overview]
Message-ID: <20260420-stable-reply-btrfs-6-6@kernel.org> (raw)
In-Reply-To: <20260417025116.743-1-ruohanlan@aliyun.com>
On Fri, Apr 17, 2026, Ruohan Lan wrote:
> Backport 9ca0e58cb752 ("btrfs: merge btrfs_orig_bbio_end_io() into
> btrfs_bio_end_io()") and d48e1dea3931 ("btrfs: fix error propagation
> of split bios") to 6.6.y.
I had to drop d48e1dea3931 ("btrfs: fix error propagation of split
bios") from 6.6.y as it doesn't build on riscv64.
The commit uses cmpxchg(&bbio->status, ...) where bbio->status is
blk_status_t (u8). riscv's __cmpxchg on 6.6 only supports 4- and
8-byte sizes and triggers BUILD_BUG() for any other size:
fs/btrfs/bio.c: In function 'btrfs_bio_end_io':
include/linux/compiler_types.h:474:45: error: call to
'__compiletime_assert_386' declared with attribute error:
BUILD_BUG failed
...
cmpxchg(&bbio->status, BLK_STS_OK, status);
1-/2-byte cmpxchg support was added to riscv by 54280ca64626
("riscv/cmpxchg: Implement cmpxchg for variables of size 1 and 2")
in v6.10, which is why mainline builds fine but 6.6 doesn't.
The 9ca0e58cb752 prerequisite is in the queue; d48e1dea3931 itself
will need a re-spin that either avoids sub-word cmpxchg, or a
backport of the riscv cmpxchg8/16 infrastructure as a prerequisite
(which is likely more invasive than we'd want in stable).
Could you (or Naohiro) take a look at reworking the fix so it doesn't
require sub-word cmpxchg on 6.6.y? Something like a spinlock-protected
update, or storing the status in a wider type, would let us keep the
fix on 6.6.y.
--
Thanks,
Sasha
prev parent reply other threads:[~2026-04-20 13:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 2:51 [PATCH 6.6.y 0/2] backport to fix error propagation of split bios Ruohan Lan
2026-04-17 2:51 ` [PATCH 6.6.y 1/2] btrfs: merge btrfs_orig_bbio_end_io() into btrfs_bio_end_io() Ruohan Lan
2026-04-17 2:51 ` [PATCH 6.6.y 2/2] btrfs: fix error propagation of split bios Ruohan Lan
2026-04-20 13:21 ` Sasha Levin [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=20260420-stable-reply-btrfs-6-6@kernel.org \
--to=sashal@kernel.org \
--cc=dsterba@suse.com \
--cc=hch@lst.de \
--cc=johannes.thumshirn@wdc.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=naohiro.aota@wdc.com \
--cc=ruohanlan@aliyun.com \
--cc=stable@vger.kernel.org \
--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 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.