Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/3] dm era: a metadata device that never comes back
@ 2026-11-24 12:25 Denis V. Lunev
  2026-11-24 12:25 ` [PATCH v2 1/3] dm persistent data: put back the reference a failed shadow dropped Denis V. Lunev
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Denis V. Lunev @ 2026-11-24 12:25 UTC (permalink / raw)
  To: agk, snitzer, mpatocka, dm-devel
  Cc: bmarzins, thornber, linux-kernel, stable, den

We move running containers between machines without restarting them,
and their block volumes travel with them, so dm-era tells us which
blocks changed between copy passes.

About one move in three ended with the volume dead rather than moved:
the metadata broke, every commit after it failed, the target reported
"era Error", and the writes it tracked began to fail, which takes the
workload's filesystem read-only. Rebuilding the device recovers the
tracking, not the filesystem.

Three unrelated causes, all of which the kernel log blames on the
space map, which is the victim. Two need no bad luck: multipathd asks
every target that appears for its status, so one is asked exactly
while it resumes, and again while it suspends. The third is older and
wider - a transient read failure in the persistent-data library leaves
the space map short, and the next commit makes that permanent. dm-thin
and dm-cache reach it too, where it costs a transaction rather than the
device, because they can abort and dm-era cannot.

Each patch is reproduced on a kernel whose only modification is the fix
under test. Patch 3 must not be backported before patch 2, nor before
cca2c6aebe86, where the resize goes through the worker the two would
refuse.

v1: https://lore.kernel.org/dm-devel/20261118110239.2910290-1-den@openvz.org/

Changes since v1:

 - patch 1 no longer moves the decrement past the copy. Holding the
   copy's write lock across dm_sm_dec_block() raises the number of
   blocks one task holds, because the decrement starts by shadowing a
   bitmap block of its own, and the targets size their dm-bufio reserve
   for the peak without that. The reference is put back on the paths
   that fail instead, which leaves the order, and the peak, as they
   were. Reported by the Sashiko AI review.
 - patch 1 no longer releases the block allocated for the copy. That
   block is leaked on the error paths, as it was before the patch, but
   releasing it is wrong while the space map is in bootstrap mode,
   where blocks are handed out without a count to decrement.

Denis V. Lunev (3):
  dm persistent data: put back the reference a failed shadow dropped
  dm era: refuse metadata rpcs once the target is suspended
  dm era: construct the target suspended

 drivers/md/dm-era-target.c                          | 10 +++++++++-
 drivers/md/persistent-data/dm-transaction-manager.c |  9 +++++++--
 2 files changed, 16 insertions(+), 3 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-11-24 12:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 12:25 [PATCH v2 0/3] dm era: a metadata device that never comes back Denis V. Lunev
2026-11-24 12:25 ` [PATCH v2 1/3] dm persistent data: put back the reference a failed shadow dropped Denis V. Lunev
2026-11-24 12:26 ` [PATCH v2 2/3] dm era: refuse metadata rpcs once the target is suspended Denis V. Lunev
2026-11-24 12:26 ` [PATCH v2 3/3] dm era: construct the target suspended Denis V. Lunev

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