Skip to content

dm cache: fix passthrough mode regressions

Ming-Hung Tsai dm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7dm cache: fix null-deref with concurrent writes in passthrough modedrivers/md/dm-cache-target.c+4 -20 replies
2/7dm cache: fix write path cache coherency in passthrough modedrivers/md/dm-cache-target.c+1 -00 replies
3/7dm cache: fix write hang in passthrough modedrivers/md/dm-cache-target.c+25 -50 replies
4/7dm cache policy smq: fix missing locks in invalidating cache blocksdrivers/md/dm-cache-policy-smq.c+4 -00 replies
5/7dm cache: fix concurrent write failure in passthrough modedrivers/md/dm-cache-target.c+9 -00 replies
6/7dm cache: fix dirty mapping checking in passthrough mode switchingdrivers/md/dm-cache-metadata.c drivers/md/dm-cache-metadata.h drivers/md/dm-cache-target.c+8 -330 replies
7/7dm cache: prevent entering passthrough mode after unclean shutdowndrivers/md/dm-cache-metadata.c drivers/md/dm-cache-metadata.h drivers/md/dm-cache-target.c+32 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] dm cache: fix passthrough mode regressions

dm-cache's passthrough mode, introduced in kernel v3.13 commit 2ee57d587357 ("dm cache: add passthrough mode"), is a maintenance mode that bypasses the cache, designed for scenarios where the cache coherency is uncertain. It allows administrators to verify cache coherency while the cached device remains operational, without having to drop the entire cache.

In kernel v4.12, the significant dm-cache rework commit b29d4986d0da ("dm cache: significant rework to leverage dm-bio-prison-v2") caused multiple regressions that broke passthrough mode when handling writes, causing null-ptr-deref and coherency issues. The fixes restore passthrough mode to full functionality.

Ming-Hung Tsai (7):
dm cache: fix null-deref with concurrent writes in passthrough mode dm cache: fix write path cache coherency in passthrough mode dm cache: fix write hang in passthrough mode
dm cache policy smq: fix missing locks in invalidating cache blocks dm cache: fix concurrent write failure in passthrough mode dm cache: fix dirty mapping checking in passthrough mode switching dm cache: prevent entering passthrough mode after unclean shutdown

 drivers/md/dm-cache-metadata.c   | 20 ++++---
 drivers/md/dm-cache-metadata.h   | 10 ++--
 drivers/md/dm-cache-policy-smq.c |  4 ++
 drivers/md/dm-cache-target.c     | 90 +++++++++++++++++++++++---------
 4 files changed, 83 insertions(+), 41 deletions(-)
Signature · 1 line
2.49.0