From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 00/12] Cleanups of blk_status_t use
Date: Thu, 24 Apr 2025 08:09:59 +0200 [thread overview]
Message-ID: <20250424060959.GI3659@twin.jikos.cz> (raw)
In-Reply-To: <1142ff0f-4296-4877-b8b6-1be2f78ff9ad@gmx.com>
On Thu, Apr 24, 2025 at 03:04:21PM +0930, Qu Wenruo wrote:
> 在 2025/4/24 01:27, David Sterba 写道:
> > Use the blk_status_t only for interaction with block layer API and
> > remove it from our functions. Do some naming unifications and minor
> > cleanups.
>
> Reviewed-by: Qu Wenruo <wqu@suse.com>
>
> Although I'm wondering if it's even possible to require a forced
> compiler warning when using blk_status_t as other types and vice verse?
There already is forced type for the non-zero values
https://elixir.bootlin.com/linux/v6.14.3/source/include/linux/blk_types.h#L96
typedef u8 __bitwise blk_status_t;
typedef u16 blk_short_t;
#define BLK_STS_OK 0
#define BLK_STS_NOTSUPP ((__force blk_status_t)1)
#define BLK_STS_TIMEOUT ((__force blk_status_t)2)
#define BLK_STS_NOSPC ((__force blk_status_t)3)
...
and from what I've seen there were no type mismatches.
next prev parent reply other threads:[~2025-04-24 6:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 15:57 [PATCH 00/12] Cleanups of blk_status_t use David Sterba
2025-04-23 15:57 ` [PATCH 01/12] btrfs: drop redundant local variable in raid_wait_write_end_io() David Sterba
2025-04-23 15:57 ` [PATCH 02/12] btrfs: change return type of btrfs_lookup_bio_sums() to int David Sterba
2025-04-23 15:57 ` [PATCH 03/12] btrfs: change return type of btrfs_csum_one_bio() " David Sterba
2025-04-23 15:57 ` [PATCH 04/12] btrfs: change return type of btree_csum_one_bio() " David Sterba
2025-04-23 15:57 ` [PATCH 05/12] btrfs: change return type of btrfs_bio_csum() " David Sterba
2025-04-23 15:57 ` [PATCH 06/12] btrfs: rename ret to status in btrfs_submit_chunk() David Sterba
2025-04-23 15:57 ` [PATCH 07/12] btrfs: rename error to ret " David Sterba
2025-04-23 15:57 ` [PATCH 08/12] btrfs: simplify reading bio status in end_compressed_writeback() David Sterba
2025-04-23 15:57 ` [PATCH 09/12] btrfs: rename ret to status in btrfs_submit_compressed_read() David Sterba
2025-04-23 15:57 ` [PATCH 10/12] btrfs: rename ret2 to ret " David Sterba
2025-04-23 15:57 ` [PATCH 11/12] btrfs: change return type of btrfs_alloc_dummy_sum() to int David Sterba
2025-04-23 15:57 ` [PATCH 12/12] btrfs: raid56: rename parameter err to status in endio helpers David Sterba
2025-04-24 5:34 ` [PATCH 00/12] Cleanups of blk_status_t use Qu Wenruo
2025-04-24 6:09 ` David Sterba [this message]
2025-04-25 13:38 ` Christoph Hellwig
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=20250424060959.GI3659@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.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