public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening
@ 2025-11-11 12:13 Li Chen
  2025-11-11 12:13 ` [PATCH v2 1/3] dm-pcache: allow built-in build and rename flush helper Li Chen
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Li Chen @ 2025-11-11 12:13 UTC (permalink / raw)
  To: dm-devel, linux-kernel, Dongsheng Yang, Zheng Gu

From: Li Chen <chenl311@chinatelecom.cn>

This three-patch series tidies dm-pcache’s build glue and tightens the metadata scan.

Patch 1 allow dm-pcache to be linked into vmlinux and avoids clashing with the sunrpc
cache_flush() by using obj-$(CONFIG_DM_PCACHE) and renaming the helper across the tree.

Patch 2 drops a redundant recomputation of the metadata slot pointer while walking headers.

Patch 3 Ensure dm-pcache initializes cache_info from a zeroed state so metadata CRC
failures can’t leak stale flags into the new-cache path.

Thanks for your review.

Li Chen (3):
  dm-pcache: allow built-in build and rename flush helper
  dm-pcache: reuse meta_addr in pcache_meta_find_latest
  dm-pcache: zero cache_info before default init

 drivers/md/dm-pcache/Makefile          | 2 +-
 drivers/md/dm-pcache/cache.c           | 4 ++--
 drivers/md/dm-pcache/cache.h           | 2 +-
 drivers/md/dm-pcache/cache_req.c       | 6 +++---
 drivers/md/dm-pcache/pcache_internal.h | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/3] dm-pcache: allow built-in build and rename flush helper
  2025-11-11 12:13 [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening Li Chen
@ 2025-11-11 12:13 ` Li Chen
  2025-11-13  6:39   ` Dongsheng Yang
  2025-11-11 12:13 ` [PATCH v2 2/3] dm-pcache: reuse meta_addr in pcache_meta_find_latest Li Chen
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Li Chen @ 2025-11-11 12:13 UTC (permalink / raw)
  To: dm-devel, linux-kernel, Dongsheng Yang, Zheng Gu

From: Li Chen <chenl311@chinatelecom.cn>

CONFIG_BCACHE is tristate, so dm-pcache can also be built-in.
Switch the Makefile to use obj-$(CONFIG_DM_PCACHE) so the target can be
linked into vmlinux instead of always being a loadable module.

Also rename cache_flush() to pcache_cache_flush() to avoid a global
symbol clash with sunrpc/cache.c's cache_flush().

Signed-off-by: Li Chen <chenl311@chinatelecom.cn>
---
 drivers/md/dm-pcache/Makefile    | 2 +-
 drivers/md/dm-pcache/cache.c     | 2 +-
 drivers/md/dm-pcache/cache.h     | 2 +-
 drivers/md/dm-pcache/cache_req.c | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/md/dm-pcache/Makefile b/drivers/md/dm-pcache/Makefile
index 86776e4acad2..cedfd38854f6 100644
--- a/drivers/md/dm-pcache/Makefile
+++ b/drivers/md/dm-pcache/Makefile
@@ -1,3 +1,3 @@
 dm-pcache-y := dm_pcache.o cache_dev.o segment.o backing_dev.o cache.o cache_gc.o cache_writeback.o cache_segment.o cache_key.o cache_req.o
 
-obj-m += dm-pcache.o
+obj-$(CONFIG_DM_PCACHE) += dm-pcache.o
diff --git a/drivers/md/dm-pcache/cache.c b/drivers/md/dm-pcache/cache.c
index d8e92367d947..d516d4904227 100644
--- a/drivers/md/dm-pcache/cache.c
+++ b/drivers/md/dm-pcache/cache.c
@@ -411,7 +411,7 @@ void pcache_cache_stop(struct dm_pcache *pcache)
 {
 	struct pcache_cache *cache = &pcache->cache;
 
-	cache_flush(cache);
+	pcache_cache_flush(cache);
 
 	cancel_delayed_work_sync(&cache->gc_work);
 	flush_work(&cache->clean_work);
diff --git a/drivers/md/dm-pcache/cache.h b/drivers/md/dm-pcache/cache.h
index 1136d86958c8..27613b56be54 100644
--- a/drivers/md/dm-pcache/cache.h
+++ b/drivers/md/dm-pcache/cache.h
@@ -339,7 +339,7 @@ void cache_seg_put(struct pcache_cache_segment *cache_seg);
 void cache_seg_set_next_seg(struct pcache_cache_segment *cache_seg, u32 seg_id);
 
 /* cache request*/
-int cache_flush(struct pcache_cache *cache);
+int pcache_cache_flush(struct pcache_cache *cache);
 void miss_read_end_work_fn(struct work_struct *work);
 int pcache_cache_handle_req(struct pcache_cache *cache, struct pcache_request *pcache_req);
 
diff --git a/drivers/md/dm-pcache/cache_req.c b/drivers/md/dm-pcache/cache_req.c
index 27f94c1fa968..7854a30e07b7 100644
--- a/drivers/md/dm-pcache/cache_req.c
+++ b/drivers/md/dm-pcache/cache_req.c
@@ -790,7 +790,7 @@ static int cache_write(struct pcache_cache *cache, struct pcache_request *pcache
 }
 
 /**
- * cache_flush - Flush all ksets to persist any pending cache data
+ * pcache_cache_flush - Flush all ksets to persist any pending cache data
  * @cache: Pointer to the cache structure
  *
  * This function iterates through all ksets associated with the provided `cache`
@@ -802,7 +802,7 @@ static int cache_write(struct pcache_cache *cache, struct pcache_request *pcache
  * the respective error code, preventing the flush operation from proceeding to
  * subsequent ksets.
  */
-int cache_flush(struct pcache_cache *cache)
+int pcache_cache_flush(struct pcache_cache *cache)
 {
 	struct pcache_cache_kset *kset;
 	int ret;
@@ -827,7 +827,7 @@ int pcache_cache_handle_req(struct pcache_cache *cache, struct pcache_request *p
 	struct bio *bio = pcache_req->bio;
 
 	if (unlikely(bio->bi_opf & REQ_PREFLUSH))
-		return cache_flush(cache);
+		return pcache_cache_flush(cache);
 
 	if (bio_data_dir(bio) == READ)
 		return cache_read(cache, pcache_req);
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/3] dm-pcache: reuse meta_addr in pcache_meta_find_latest
  2025-11-11 12:13 [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening Li Chen
  2025-11-11 12:13 ` [PATCH v2 1/3] dm-pcache: allow built-in build and rename flush helper Li Chen
@ 2025-11-11 12:13 ` Li Chen
  2025-11-13  6:40   ` Dongsheng Yang
  2025-11-11 12:13 ` [PATCH v2 3/3] dm-pcache: zero cache_info before default init Li Chen
  2025-11-13  6:43 ` [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening Dongsheng Yang
  3 siblings, 1 reply; 10+ messages in thread
From: Li Chen @ 2025-11-11 12:13 UTC (permalink / raw)
  To: dm-devel, linux-kernel, Dongsheng Yang, Zheng Gu

From: Li Chen <chenl311@chinatelecom.cn>

pcache_meta_find_latest() already computes the metadata address as
meta_addr. Reuse that instead of recomputing.

Signed-off-by: Li Chen <chenl311@chinatelecom.cn>
---
 drivers/md/dm-pcache/pcache_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-pcache/pcache_internal.h b/drivers/md/dm-pcache/pcache_internal.h
index d427e534727c..b7a3319d2bd3 100644
--- a/drivers/md/dm-pcache/pcache_internal.h
+++ b/drivers/md/dm-pcache/pcache_internal.h
@@ -99,7 +99,7 @@ static inline void __must_check *pcache_meta_find_latest(struct pcache_meta_head
 		/* Update latest if a more recent sequence is found */
 		if (!latest || pcache_meta_seq_after(meta->seq, seq_latest)) {
 			seq_latest = meta->seq;
-			latest = (void *)header + (i * meta_max_size);
+			latest = meta_addr;
 		}
 	}
 
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/3] dm-pcache: zero cache_info before default init
  2025-11-11 12:13 [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening Li Chen
  2025-11-11 12:13 ` [PATCH v2 1/3] dm-pcache: allow built-in build and rename flush helper Li Chen
  2025-11-11 12:13 ` [PATCH v2 2/3] dm-pcache: reuse meta_addr in pcache_meta_find_latest Li Chen
@ 2025-11-11 12:13 ` Li Chen
  2025-11-12  8:24   ` Zheng Gu
  2025-11-13  6:40   ` Dongsheng Yang
  2025-11-13  6:43 ` [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening Dongsheng Yang
  3 siblings, 2 replies; 10+ messages in thread
From: Li Chen @ 2025-11-11 12:13 UTC (permalink / raw)
  To: dm-devel, linux-kernel, Dongsheng Yang, Zheng Gu

From: Li Chen <chenl311@chinatelecom.cn>

pcache_meta_find_latest() leaves whatever it last copied into the
caller’s buffer even when it returns NULL. For cache_info_init(),
that meant cache->cache_info could still contain CRC-bad garbage when
no valid metadata exists, leading later initialization paths to read
bogus flags.

Explicitly memset cache->cache_info in cache_info_init_default()
so new-cache paths start from a clean slate. The default sequence
number assignment becomes redundant with this reset, so it drops out.

Signed-off-by: Li Chen <chenl311@chinatelecom.cn>
---
 drivers/md/dm-pcache/cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-pcache/cache.c b/drivers/md/dm-pcache/cache.c
index d516d4904227..698697a7a73c 100644
--- a/drivers/md/dm-pcache/cache.c
+++ b/drivers/md/dm-pcache/cache.c
@@ -181,7 +181,7 @@ static void cache_info_init_default(struct pcache_cache *cache)
 {
 	struct pcache_cache_info *cache_info = &cache->cache_info;
 
-	cache_info->header.seq = 0;
+	memset(cache_info, 0, sizeof(*cache_info));
 	cache_info->n_segs = cache->cache_dev->seg_num;
 	cache_info_set_gc_percent(cache_info, PCACHE_CACHE_GC_PERCENT_DEFAULT);
 }
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 3/3] dm-pcache: zero cache_info before default init
  2025-11-11 12:13 ` [PATCH v2 3/3] dm-pcache: zero cache_info before default init Li Chen
@ 2025-11-12  8:24   ` Zheng Gu
  2025-11-13  6:40   ` Dongsheng Yang
  1 sibling, 0 replies; 10+ messages in thread
From: Zheng Gu @ 2025-11-12  8:24 UTC (permalink / raw)
  To: Li Chen; +Cc: dm-devel, linux-kernel, Dongsheng Yang

On Tue, Nov 11, 2025 at 8:14 PM Li Chen <me@linux.beauty> wrote:
>
> From: Li Chen <chenl311@chinatelecom.cn>
>
> pcache_meta_find_latest() leaves whatever it last copied into the
> caller’s buffer even when it returns NULL. For cache_info_init(),
> that meant cache->cache_info could still contain CRC-bad garbage when
> no valid metadata exists, leading later initialization paths to read
> bogus flags.
>
> Explicitly memset cache->cache_info in cache_info_init_default()
> so new-cache paths start from a clean slate. The default sequence
> number assignment becomes redundant with this reset, so it drops out.
>
> Signed-off-by: Li Chen <chenl311@chinatelecom.cn>
> ---
>  drivers/md/dm-pcache/cache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/dm-pcache/cache.c b/drivers/md/dm-pcache/cache.c
> index d516d4904227..698697a7a73c 100644
> --- a/drivers/md/dm-pcache/cache.c
> +++ b/drivers/md/dm-pcache/cache.c
> @@ -181,7 +181,7 @@ static void cache_info_init_default(struct pcache_cache *cache)
>  {
>         struct pcache_cache_info *cache_info = &cache->cache_info;
>
> -       cache_info->header.seq = 0;
> +       memset(cache_info, 0, sizeof(*cache_info));
>         cache_info->n_segs = cache->cache_dev->seg_num;
>         cache_info_set_gc_percent(cache_info, PCACHE_CACHE_GC_PERCENT_DEFAULT);
>  }
> --
> 2.51.0
>
It looks good to me.

Reviewed-by:  Zheng Gu <cengku@gmail.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/3] dm-pcache: allow built-in build and rename flush helper
  2025-11-11 12:13 ` [PATCH v2 1/3] dm-pcache: allow built-in build and rename flush helper Li Chen
@ 2025-11-13  6:39   ` Dongsheng Yang
  0 siblings, 0 replies; 10+ messages in thread
From: Dongsheng Yang @ 2025-11-13  6:39 UTC (permalink / raw)
  To: Li Chen, dm-devel, linux-kernel, Zheng Gu


在 11/11/2025 8:13 PM, Li Chen 写道:
> From: Li Chen <chenl311@chinatelecom.cn>
>
> CONFIG_BCACHE is tristate, so dm-pcache can also be built-in.
> Switch the Makefile to use obj-$(CONFIG_DM_PCACHE) so the target can be
> linked into vmlinux instead of always being a loadable module.
>
> Also rename cache_flush() to pcache_cache_flush() to avoid a global
> symbol clash with sunrpc/cache.c's cache_flush().
>
> Signed-off-by: Li Chen <chenl311@chinatelecom.cn>


Reviewed-by: Dongsheng Yang <dongsheng.yang@linux.dev>

> ---
>   drivers/md/dm-pcache/Makefile    | 2 +-
>   drivers/md/dm-pcache/cache.c     | 2 +-
>   drivers/md/dm-pcache/cache.h     | 2 +-
>   drivers/md/dm-pcache/cache_req.c | 6 +++---
>   4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/md/dm-pcache/Makefile b/drivers/md/dm-pcache/Makefile
> index 86776e4acad2..cedfd38854f6 100644
> --- a/drivers/md/dm-pcache/Makefile
> +++ b/drivers/md/dm-pcache/Makefile
> @@ -1,3 +1,3 @@
>   dm-pcache-y := dm_pcache.o cache_dev.o segment.o backing_dev.o cache.o cache_gc.o cache_writeback.o cache_segment.o cache_key.o cache_req.o
>   
> -obj-m += dm-pcache.o
> +obj-$(CONFIG_DM_PCACHE) += dm-pcache.o
> diff --git a/drivers/md/dm-pcache/cache.c b/drivers/md/dm-pcache/cache.c
> index d8e92367d947..d516d4904227 100644
> --- a/drivers/md/dm-pcache/cache.c
> +++ b/drivers/md/dm-pcache/cache.c
> @@ -411,7 +411,7 @@ void pcache_cache_stop(struct dm_pcache *pcache)
>   {
>   	struct pcache_cache *cache = &pcache->cache;
>   
> -	cache_flush(cache);
> +	pcache_cache_flush(cache);
>   
>   	cancel_delayed_work_sync(&cache->gc_work);
>   	flush_work(&cache->clean_work);
> diff --git a/drivers/md/dm-pcache/cache.h b/drivers/md/dm-pcache/cache.h
> index 1136d86958c8..27613b56be54 100644
> --- a/drivers/md/dm-pcache/cache.h
> +++ b/drivers/md/dm-pcache/cache.h
> @@ -339,7 +339,7 @@ void cache_seg_put(struct pcache_cache_segment *cache_seg);
>   void cache_seg_set_next_seg(struct pcache_cache_segment *cache_seg, u32 seg_id);
>   
>   /* cache request*/
> -int cache_flush(struct pcache_cache *cache);
> +int pcache_cache_flush(struct pcache_cache *cache);
>   void miss_read_end_work_fn(struct work_struct *work);
>   int pcache_cache_handle_req(struct pcache_cache *cache, struct pcache_request *pcache_req);
>   
> diff --git a/drivers/md/dm-pcache/cache_req.c b/drivers/md/dm-pcache/cache_req.c
> index 27f94c1fa968..7854a30e07b7 100644
> --- a/drivers/md/dm-pcache/cache_req.c
> +++ b/drivers/md/dm-pcache/cache_req.c
> @@ -790,7 +790,7 @@ static int cache_write(struct pcache_cache *cache, struct pcache_request *pcache
>   }
>   
>   /**
> - * cache_flush - Flush all ksets to persist any pending cache data
> + * pcache_cache_flush - Flush all ksets to persist any pending cache data
>    * @cache: Pointer to the cache structure
>    *
>    * This function iterates through all ksets associated with the provided `cache`
> @@ -802,7 +802,7 @@ static int cache_write(struct pcache_cache *cache, struct pcache_request *pcache
>    * the respective error code, preventing the flush operation from proceeding to
>    * subsequent ksets.
>    */
> -int cache_flush(struct pcache_cache *cache)
> +int pcache_cache_flush(struct pcache_cache *cache)
>   {
>   	struct pcache_cache_kset *kset;
>   	int ret;
> @@ -827,7 +827,7 @@ int pcache_cache_handle_req(struct pcache_cache *cache, struct pcache_request *p
>   	struct bio *bio = pcache_req->bio;
>   
>   	if (unlikely(bio->bi_opf & REQ_PREFLUSH))
> -		return cache_flush(cache);
> +		return pcache_cache_flush(cache);
>   
>   	if (bio_data_dir(bio) == READ)
>   		return cache_read(cache, pcache_req);

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 2/3] dm-pcache: reuse meta_addr in pcache_meta_find_latest
  2025-11-11 12:13 ` [PATCH v2 2/3] dm-pcache: reuse meta_addr in pcache_meta_find_latest Li Chen
@ 2025-11-13  6:40   ` Dongsheng Yang
  0 siblings, 0 replies; 10+ messages in thread
From: Dongsheng Yang @ 2025-11-13  6:40 UTC (permalink / raw)
  To: Li Chen, dm-devel, linux-kernel, Zheng Gu


在 11/11/2025 8:13 PM, Li Chen 写道:
> From: Li Chen <chenl311@chinatelecom.cn>
>
> pcache_meta_find_latest() already computes the metadata address as
> meta_addr. Reuse that instead of recomputing.
>
> Signed-off-by: Li Chen <chenl311@chinatelecom.cn>


Reviewed-by: Dongsheng Yang <dongsheng.yang@linux.dev


> ---
>   drivers/md/dm-pcache/pcache_internal.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/dm-pcache/pcache_internal.h b/drivers/md/dm-pcache/pcache_internal.h
> index d427e534727c..b7a3319d2bd3 100644
> --- a/drivers/md/dm-pcache/pcache_internal.h
> +++ b/drivers/md/dm-pcache/pcache_internal.h
> @@ -99,7 +99,7 @@ static inline void __must_check *pcache_meta_find_latest(struct pcache_meta_head
>   		/* Update latest if a more recent sequence is found */
>   		if (!latest || pcache_meta_seq_after(meta->seq, seq_latest)) {
>   			seq_latest = meta->seq;
> -			latest = (void *)header + (i * meta_max_size);
> +			latest = meta_addr;
>   		}
>   	}
>   

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 3/3] dm-pcache: zero cache_info before default init
  2025-11-11 12:13 ` [PATCH v2 3/3] dm-pcache: zero cache_info before default init Li Chen
  2025-11-12  8:24   ` Zheng Gu
@ 2025-11-13  6:40   ` Dongsheng Yang
  1 sibling, 0 replies; 10+ messages in thread
From: Dongsheng Yang @ 2025-11-13  6:40 UTC (permalink / raw)
  To: Li Chen, dm-devel, linux-kernel, Zheng Gu


在 11/11/2025 8:13 PM, Li Chen 写道:
> From: Li Chen <chenl311@chinatelecom.cn>
>
> pcache_meta_find_latest() leaves whatever it last copied into the
> caller’s buffer even when it returns NULL. For cache_info_init(),
> that meant cache->cache_info could still contain CRC-bad garbage when
> no valid metadata exists, leading later initialization paths to read
> bogus flags.
>
> Explicitly memset cache->cache_info in cache_info_init_default()
> so new-cache paths start from a clean slate. The default sequence
> number assignment becomes redundant with this reset, so it drops out.
>
> Signed-off-by: Li Chen <chenl311@chinatelecom.cn>

Reviewed-by: Dongsheng Yang <dongsheng.yang@linux.dev>

> ---
>   drivers/md/dm-pcache/cache.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/dm-pcache/cache.c b/drivers/md/dm-pcache/cache.c
> index d516d4904227..698697a7a73c 100644
> --- a/drivers/md/dm-pcache/cache.c
> +++ b/drivers/md/dm-pcache/cache.c
> @@ -181,7 +181,7 @@ static void cache_info_init_default(struct pcache_cache *cache)
>   {
>   	struct pcache_cache_info *cache_info = &cache->cache_info;
>   
> -	cache_info->header.seq = 0;
> +	memset(cache_info, 0, sizeof(*cache_info));
>   	cache_info->n_segs = cache->cache_dev->seg_num;
>   	cache_info_set_gc_percent(cache_info, PCACHE_CACHE_GC_PERCENT_DEFAULT);
>   }

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening
  2025-11-11 12:13 [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening Li Chen
                   ` (2 preceding siblings ...)
  2025-11-11 12:13 ` [PATCH v2 3/3] dm-pcache: zero cache_info before default init Li Chen
@ 2025-11-13  6:43 ` Dongsheng Yang
  2025-11-18 18:05   ` Mikulas Patocka
  3 siblings, 1 reply; 10+ messages in thread
From: Dongsheng Yang @ 2025-11-13  6:43 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Li Chen, Linux Device Mapper, Linux Kernel Mailing List, Zheng Gu

Hi Mikulas,

     Please consider taking these three patches.


Thanx

Dongsheng

在 11/11/2025 8:13 PM, Li Chen 写道:
> From: Li Chen <chenl311@chinatelecom.cn>
>
> This three-patch series tidies dm-pcache’s build glue and tightens the metadata scan.
>
> Patch 1 allow dm-pcache to be linked into vmlinux and avoids clashing with the sunrpc
> cache_flush() by using obj-$(CONFIG_DM_PCACHE) and renaming the helper across the tree.
>
> Patch 2 drops a redundant recomputation of the metadata slot pointer while walking headers.
>
> Patch 3 Ensure dm-pcache initializes cache_info from a zeroed state so metadata CRC
> failures can’t leak stale flags into the new-cache path.
>
> Thanks for your review.
>
> Li Chen (3):
>    dm-pcache: allow built-in build and rename flush helper
>    dm-pcache: reuse meta_addr in pcache_meta_find_latest
>    dm-pcache: zero cache_info before default init
>
>   drivers/md/dm-pcache/Makefile          | 2 +-
>   drivers/md/dm-pcache/cache.c           | 4 ++--
>   drivers/md/dm-pcache/cache.h           | 2 +-
>   drivers/md/dm-pcache/cache_req.c       | 6 +++---
>   drivers/md/dm-pcache/pcache_internal.h | 2 +-
>   5 files changed, 8 insertions(+), 8 deletions(-)
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening
  2025-11-13  6:43 ` [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening Dongsheng Yang
@ 2025-11-18 18:05   ` Mikulas Patocka
  0 siblings, 0 replies; 10+ messages in thread
From: Mikulas Patocka @ 2025-11-18 18:05 UTC (permalink / raw)
  To: Dongsheng Yang
  Cc: Li Chen, Linux Device Mapper, Linux Kernel Mailing List, Zheng Gu

[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]



On Thu, 13 Nov 2025, Dongsheng Yang wrote:

> Hi Mikulas,
> 
>     Please consider taking these three patches.
> 
> Thanx
> 
> Dongsheng

OK, thanks. I accepted the patches and I staged them for the kernel 6.18.

Mikulas


> 在 11/11/2025 8:13 PM, Li Chen 写道:
> > From: Li Chen <chenl311@chinatelecom.cn>
> > 
> > This three-patch series tidies dm-pcache’s build glue and tightens the
> > metadata scan.
> > 
> > Patch 1 allow dm-pcache to be linked into vmlinux and avoids clashing with
> > the sunrpc
> > cache_flush() by using obj-$(CONFIG_DM_PCACHE) and renaming the helper
> > across the tree.
> > 
> > Patch 2 drops a redundant recomputation of the metadata slot pointer while
> > walking headers.
> > 
> > Patch 3 Ensure dm-pcache initializes cache_info from a zeroed state so
> > metadata CRC
> > failures can’t leak stale flags into the new-cache path.
> > 
> > Thanks for your review.
> > 
> > Li Chen (3):
> >    dm-pcache: allow built-in build and rename flush helper
> >    dm-pcache: reuse meta_addr in pcache_meta_find_latest
> >    dm-pcache: zero cache_info before default init
> > 
> >   drivers/md/dm-pcache/Makefile          | 2 +-
> >   drivers/md/dm-pcache/cache.c           | 4 ++--
> >   drivers/md/dm-pcache/cache.h           | 2 +-
> >   drivers/md/dm-pcache/cache_req.c       | 6 +++---
> >   drivers/md/dm-pcache/pcache_internal.h | 2 +-
> >   5 files changed, 8 insertions(+), 8 deletions(-)
> > 
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-11-18 18:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-11 12:13 [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening Li Chen
2025-11-11 12:13 ` [PATCH v2 1/3] dm-pcache: allow built-in build and rename flush helper Li Chen
2025-11-13  6:39   ` Dongsheng Yang
2025-11-11 12:13 ` [PATCH v2 2/3] dm-pcache: reuse meta_addr in pcache_meta_find_latest Li Chen
2025-11-13  6:40   ` Dongsheng Yang
2025-11-11 12:13 ` [PATCH v2 3/3] dm-pcache: zero cache_info before default init Li Chen
2025-11-12  8:24   ` Zheng Gu
2025-11-13  6:40   ` Dongsheng Yang
2025-11-13  6:43 ` [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening Dongsheng Yang
2025-11-18 18:05   ` Mikulas Patocka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox