[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <32402888-28ea-436a-b958-7136123f2c0c@suse.de>
Date: Tue, 12 Nov 2024 07:58:25 +0100
From: Hannes Reinecke <hare@...e.de>
To: John Garry <john.g.garry@...cle.com>, axboe@...nel.dk, song@...nel.org,
yukuai3@...wei.com, hch@....de
Cc: martin.petersen@...cle.com, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org,
Johannes.Thumshirn@....com
Subject: Re: [PATCH v4 1/6] block: Rework bio_split() return value
On 11/11/24 12:21, John Garry wrote:
> Instead of returning an inconclusive value of NULL for an error in calling
> bio_split(), return a ERR_PTR() always.
>
> Also remove the BUG_ON() calls, and WARN_ON_ONCE() instead. Indeed, since
> almost all callers don't check the return code from bio_split(), we'll
> crash anyway (for those failures).
>
> Fix up the only user which checks bio_split() return code today (directly
> or indirectly), blk_crypto_fallback_split_bio_if_needed(). The md/bcache
> code does check the return code in cached_dev_cache_miss() ->
> bio_next_split() -> bio_split(), but only to see if there was a split, so
> there would be no change in behaviour here (when returning a ERR_PTR()).
>
> Reviewed-by: Christoph Hellwig <hch@....de>
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@....com>
> Signed-off-by: John Garry <john.g.garry@...cle.com>
> ---
> block/bio.c | 10 ++++++----
> block/blk-crypto-fallback.c | 2 +-
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@...e.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@...e.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Powered by blists - more mailing lists