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]
Date:   Wed, 28 Jun 2023 14:36:10 +0800
From:   Yu Kuai <yukuai1@...weicloud.com>
To:     linan666@...weicloud.com, song@...nel.org,
        guoqing.jiang@...ud.ionos.com, colyli@...e.de, xni@...hat.com
Cc:     linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
        linan122@...wei.com, yi.zhang@...wei.com, houtao1@...wei.com,
        yangerkun@...wei.com, "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH 1/3] md/raid10: check replacement and rdev to prevent
 submit the same io twice

Hi,

在 2023/06/28 9:57, linan666@...weicloud.com 写道:
> From: Li Nan <linan122@...wei.com>
> 
> After commit 4ca40c2ce099 ("md/raid10: Allow replacement device to be
> replace old drive."), 'rdev' and 'replacement' could appear to be
> identical. There are already checks for that in wait_blocked_dev() and
> raid10_write_request(). Add check for raid10_handle_discard() now.
> 

I'm working on synchronize io with array configuration, so that these
checks is not necessary and can be removed, however, this might take
some time, before that, this patch LGTM:

Reviewed-by: Yu Kuai <yukuai3@...wei.com>

> Signed-off-by: Li Nan <linan122@...wei.com>
> ---
>   drivers/md/raid10.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index fabc340aae4f..3e6a09aaaba6 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -1811,6 +1811,8 @@ static int raid10_handle_discard(struct mddev *mddev, struct bio *bio)
>   		r10_bio->devs[disk].bio = NULL;
>   		r10_bio->devs[disk].repl_bio = NULL;
>   
> +		if (rdev == rrdev)
> +			rrdev = NULL;
>   		if (rdev && (test_bit(Faulty, &rdev->flags)))
>   			rdev = NULL;
>   		if (rrdev && (test_bit(Faulty, &rrdev->flags)))
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ