Linux RAID subsystem development
 help / color / mirror / Atom feed
From: "Yu Kuai" <yukuai@fnnas.com>
To: <linan666@huaweicloud.com>, <song@kernel.org>
Cc: <xni@redhat.com>, <linux-raid@vger.kernel.org>,
	 <linux-kernel@vger.kernel.org>, <yangerkun@huawei.com>,
	 <yi.zhang@huawei.com>, <yukuai@fnnas.com>
Subject: Re: [PATCH v2 11/14] md: clean up resync_free_folio
Date: Thu, 5 Feb 2026 00:59:12 +0800	[thread overview]
Message-ID: <1ae55b7f-fd28-4994-8fa5-956864c40139@fnnas.com> (raw)
In-Reply-To: <20260128075708.2259525-12-linan666@huaweicloud.com>

Hi,

在 2026/1/28 15:57, linan666@huaweicloud.com 写道:
> From: Li Nan <linan122@huawei.com>
>
> The resync_free_folio() helper only wraps a single folio_put() call,
> so remove it and call folio_put() directly.
>
> Signed-off-by: Li Nan <linan122@huawei.com>
> ---
>   drivers/md/raid1-10.c | 5 -----
>   drivers/md/raid1.c    | 4 ++--
>   drivers/md/raid10.c   | 4 ++--
>   3 files changed, 4 insertions(+), 9 deletions(-)

Same as patch 10, I think this patch should be merged into patch 5.

>
> diff --git a/drivers/md/raid1-10.c b/drivers/md/raid1-10.c
> index 2ff1f8855900..ffbd7bd0f6e8 100644
> --- a/drivers/md/raid1-10.c
> +++ b/drivers/md/raid1-10.c
> @@ -50,11 +50,6 @@ static inline int resync_alloc_folio(struct resync_folio *rf,
>   	return 0;
>   }
>   
> -static inline void resync_free_folio(struct resync_folio *rf)
> -{
> -	folio_put(rf->folio);
> -}
> -
>   /*
>    * 'strct resync_folio' stores actual pages used for doing the resync
>    *  IO, and it is per-bio, so make .bi_private points to it.
> diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
> index a303349eeff4..b5239b5cb4e9 100644
> --- a/drivers/md/raid1.c
> +++ b/drivers/md/raid1.c
> @@ -199,7 +199,7 @@ static void * r1buf_pool_alloc(gfp_t gfp_flags, void *data)
>   
>   out_free_folio:
>   	while (--j >= 0)
> -		resync_free_folio(&rfs[j]);
> +		folio_put(rfs[j].folio);
>   
>   out_free_bio:
>   	while (++j < conf->raid_disks * 2) {
> @@ -222,7 +222,7 @@ static void r1buf_pool_free(void *__r1_bio, void *data)
>   
>   	for (i = conf->raid_disks * 2; i--; ) {
>   		rf = get_resync_folio(r1bio->bios[i]);
> -		resync_free_folio(rf);
> +		folio_put(rf->folio);
>   		bio_uninit(r1bio->bios[i]);
>   		kfree(r1bio->bios[i]);
>   	}
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index d8a5fadfc933..b728131bdad4 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -204,7 +204,7 @@ static void * r10buf_pool_alloc(gfp_t gfp_flags, void *data)
>   
>   out_free_folio:
>   	while (--j >= 0)
> -		resync_free_folio(&rfs[j]);
> +		folio_put(rfs[j].folio);
>   
>   	j = 0;
>   out_free_bio:
> @@ -234,7 +234,7 @@ static void r10buf_pool_free(void *__r10_bio, void *data)
>   
>   		if (bio) {
>   			rf = get_resync_folio(bio);
> -			resync_free_folio(rf);
> +			folio_put(rf->folio);
>   			bio_uninit(bio);
>   			kfree(bio);
>   		}

-- 
Thansk,
Kuai

  reply	other threads:[~2026-02-04 16:59 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-28  7:56 [PATCH v2 00/14] folio support for sync I/O in RAID linan666
2026-01-28  7:56 ` [PATCH v2 01/14] md/raid1,raid10: clean up of RESYNC_SECTORS linan666
2026-02-04 16:29   ` Yu Kuai
2026-01-28  7:56 ` [PATCH v2 02/14] md: introduce sync_folio_io for folio support in RAID linan666
2026-02-04 16:38   ` Yu Kuai
2026-01-28  7:56 ` [PATCH v2 03/14] md/raid1: use folio for tmppage linan666
2026-02-04 16:45   ` Yu Kuai
2026-02-05  7:23     ` Li Nan
2026-02-05  7:33       ` Yu Kuai
2026-02-06  9:07         ` Li Nan
2026-01-28  7:56 ` [PATCH v2 04/14] md/raid10: " linan666
2026-01-28  7:56 ` [PATCH v2 05/14] md/raid1,raid10: use folio for sync path IO linan666
2026-01-28  7:57 ` [PATCH v2 06/14] md: Clean up folio sync support related code linan666
2026-02-04 16:52   ` Yu Kuai
2026-02-05  7:27     ` Li Nan
2026-01-28  7:57 ` [PATCH v2 07/14] md/raid1: clean up useless sync_blocks handling in raid1_sync_request linan666
2026-01-28  7:57 ` [PATCH v2 08/14] md/raid1: fix IO error at logical block size granularity linan666
2026-02-04 16:54   ` Yu Kuai
2026-01-28  7:57 ` [PATCH v2 09/14] md/raid10: " linan666
2026-02-04 16:55   ` Yu Kuai
2026-01-28  7:57 ` [PATCH v2 10/14] md/raid1,raid10: clean up resync_fetch_folio linan666
2026-02-04 16:57   ` Yu Kuai
2026-01-28  7:57 ` [PATCH v2 11/14] md: clean up resync_free_folio linan666
2026-02-04 16:59   ` Yu Kuai [this message]
2026-01-28  7:57 ` [PATCH v2 12/14] md/raid1: clean up sync IO size calculation in raid1_sync_request linan666
2026-01-28  7:57 ` [PATCH v2 13/14] md/raid10: clean up sync IO size calculation in raid10_sync_request linan666
2026-01-28  7:57 ` [PATCH v2 14/14] md/raid1,raid10: fall back to smaller order if sync folio alloc fails linan666
2026-02-04 16:48   ` Yu Kuai
2026-02-05  7:29     ` Li Nan
2026-02-04 17:02 ` [PATCH v2 00/14] folio support for sync I/O in RAID Yu Kuai
2026-02-05 12:57   ` Li Nan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ae55b7f-fd28-4994-8fa5-956864c40139@fnnas.com \
    --to=yukuai@fnnas.com \
    --cc=linan666@huaweicloud.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=xni@redhat.com \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox