[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d44a290-cb46-cbbe-6289-14d2cca44c2c@linux.dev>
Date: Wed, 27 Apr 2022 09:33:52 +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 04/12] md/raid5: Move common stripe count increment
code into __find_stripe()
On 4/21/22 3:54 AM, Logan Gunthorpe wrote:
> Both uses of find_stripe() require a fairly complicated dance to
> increment the reference count. Move this into a common find_get_stripe()
> helper.
>
> No functional changes intended.
>
> Signed-off-by: Logan Gunthorpe<logang@...tatee.com>
> ---
> drivers/md/raid5.c | 133 ++++++++++++++++++++++-----------------------
> 1 file changed, 65 insertions(+), 68 deletions(-)
>
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index 8e1ece5ce984..a0946af5b1ac 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -612,7 +612,7 @@ static void init_stripe(struct stripe_head *sh, sector_t sector, int previous)
> }
...
> @@ -624,6 +624,49 @@ static struct stripe_head *__find_stripe(struct r5conf *conf, sector_t sector,
> return NULL;
> }
>
> +static struct stripe_head *find_get_stripe(struct r5conf *conf,
> + sector_t sector, short generation, int hash)
> +{
The subject doesn't match the change, maybe something about " md/raid5:
factor out common stripe count
increment code into find_get_stripe()", just FYI. Otherwise, it
generally looks good.
Acked-by: Guoqing Jiang <guoqing.jiang@...ux.dev>
Thanks,
Guoqing
Powered by blists - more mailing lists