lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <79a8e41e-c228-44e9-8286-1b2d7b3687a4@kernel.org>
Date: Sat, 30 Aug 2025 09:48:05 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Yu Kuai <yukuai1@...weicloud.com>, axboe@...nel.dk, tj@...nel.org,
 josef@...icpanda.com, song@...nel.org, neil@...wn.name,
 akpm@...ux-foundation.org, hch@...radead.org, colyli@...nel.org,
 hare@...e.de, tieren@...as.com
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
 cgroups@...r.kernel.org, linux-raid@...r.kernel.org, yukuai3@...wei.com,
 yi.zhang@...wei.com, yangerkun@...wei.com, johnny.chenyi@...wei.com
Subject: Re: [PATCH RFC v2 04/10] md/raid10: convert read/write to use
 bio_submit_split_bioset()

On 8/28/25 15:57, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@...wei.com>
> 
> On the one hand unify bio split code, prepare to fix disordered split
> IO; On the other hand fix missing blkcg_bio_issue_init() and
> trace_block_split() for split IO.
> 
> Noted discard is not handled, because discard is only splited for

s/splited/split

> unaligned head and tail, and this can be considered slow path, the
> disorder here does not matter much.
> 
> Signed-off-by: Yu Kuai <yukuai3@...wei.com>
> ---
>  drivers/md/raid10.c | 51 +++++++++++++++++++--------------------------
>  drivers/md/raid10.h |  2 ++
>  2 files changed, 23 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index b60c30bfb6c7..0e7d2a67fca6 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -322,10 +322,12 @@ static void raid_end_bio_io(struct r10bio *r10_bio)
>  	struct bio *bio = r10_bio->master_bio;
>  	struct r10conf *conf = r10_bio->mddev->private;
>  
> -	if (!test_bit(R10BIO_Uptodate, &r10_bio->state))
> -		bio->bi_status = BLK_STS_IOERR;
> +	if (!test_and_set_bit(R10BIO_Returned, &r10_bio->state)) {
> +		if (!test_bit(R10BIO_Uptodate, &r10_bio->state))
> +			bio->bi_status = BLK_STS_IOERR;
> +		bio_endio(bio);
> +	}

This change / the R10BIO_Returned flag is not mentioned in the commit message.
Please explain why it is needed to add for switching to using
bio_submit_split_bioset(), which in itself should not introduce functional
changes. Looks like this needs to be split into different patches...


-- 
Damien Le Moal
Western Digital Research

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ