[PATCH v2 0/3] dm-pcache: built-in support and metadata hardening

Li Chen posted 3 patches 1 month, 1 week ago
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(-)
[PATCH v2 0/3] dm-pcache: built-in support and metadata hardening
Posted by Li Chen 1 month, 1 week ago
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

Re: [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening
Posted by Dongsheng Yang 1 month ago
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(-)
>
Re: [PATCH v2 0/3] dm-pcache: built-in support and metadata hardening
Posted by Mikulas Patocka 1 month ago

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(-)
> > 
>