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: <20240830122831.0000127d@linux.intel.com>
Date: Fri, 30 Aug 2024 12:28:31 +0200
From: Mariusz Tkaczyk <mariusz.tkaczyk@...ux.intel.com>
To: Yu Kuai <yukuai1@...weicloud.com>
Cc: mariusz.tkaczyk@...el.com, song@...nel.org, linux-raid@...r.kernel.org,
 linux-kernel@...r.kernel.org, yukuai3@...wei.com, yi.zhang@...wei.com,
 yangerkun@...wei.com
Subject: Re: [PATCH md-6.12 3/7] md: don't record new badblocks for faulty
 rdev

On Fri, 30 Aug 2024 15:27:17 +0800
Yu Kuai <yukuai1@...weicloud.com> wrote:

> From: Yu Kuai <yukuai3@...wei.com>
> 
> Faulty will be checked before issuing IO to the rdev, however, rdev can
> be faulty at any time, hence it's possible that rdev_set_badblocks()
> will be called for faulty rdev. In this case, mddev->sb_flags will be
> set and some other path can be blocked by updating super block.
> 
> Since faulty rdev will not be accesed anymore, there is no need to
> record new babblocks for faulty rdev and forcing updating super block.
> 
> Noted this is not a bugfix, just prevent updating superblock in some
> corner cases, and will help to slice a bug related to external
> metadata[1].
> 
> [1]
> https://lore.kernel.org/all/f34452df-810b-48b2-a9b4-7f925699a9e7@linux.intel.com/
> 
> Signed-off-by: Yu Kuai <yukuai3@...wei.com>
> ---
>  drivers/md/md.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 675d89597c7b..a3f7f407fe42 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -9757,6 +9757,10 @@ int rdev_set_badblocks(struct md_rdev *rdev, sector_t
> s, int sectors, {
>  	struct mddev *mddev = rdev->mddev;
>  	int rv;
> +
> +	if (test_bit(Faulty, &rdev->flags))
> +		return 1;
> +

Blame is volatile, this is why we need a comment here :)
Otherwise, someone may remove that.

Thanks,
Mariusz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ