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: <eb1d70f6-0cfc-20e9-8fb3-84e3076025f7@linux.dev>
Date:   Wed, 27 Apr 2022 09:32:14 +0800
From:   Guoqing Jiang <guoqing.jiang@...ux.dev>
To:     Logan Gunthorpe <logang@...tatee.com>,
        linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org,
        Song Liu <song@...nel.org>
Cc:     Christoph Hellwig <hch@...radead.org>,
        Stephen Bates <sbates@...thlin.com>,
        Martin Oliveira <Martin.Oliveira@...eticom.com>,
        David Sloan <David.Sloan@...eticom.com>
Subject: Re: [PATCH v2 02/12] md/raid5: Refactor raid5_make_request loop



On 4/21/22 3:54 AM, Logan Gunthorpe wrote:
> Break immediately if raid5_get_active_stripe() returns NULL and deindent
> the rest of the loop. Annotate this check with an unlikely().
>
> This makes the code easier to read and reduces the indentation level.
>
> No functional changes intended.
>
> Signed-off-by: Logan Gunthorpe<logang@...tatee.com>
> ---
>   drivers/md/raid5.c | 109 +++++++++++++++++++++++----------------------
>   1 file changed, 55 insertions(+), 54 deletions(-)
>
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index 97b23c18402b..cda6857e6207 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -5906,68 +5906,69 @@ static bool raid5_make_request(struct mddev *mddev, struct bio * bi)

...

> +		if (unlikely(!sh)) {
> +			/* cannot get stripe, just give-up */
> +			bi->bi_status = BLK_STS_IOERR;
> +			break;
> +		}


Nit, I would suggest to keep below original comment.

> -			/* cannot get stripe for read-ahead, just give-up */
> -			bi->bi_status = BLK_STS_IOERR;
> -			break;

Anyway. Reviewed-by: Guoqing Jiang <guoqing.jiang@...ux.dev>

Thanks,
Guoqing

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ