mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@openvz.org>
To: agk@redhat.com, snitzer@kernel.org, mpatocka@redhat.com,
	dm-devel@lists.linux.dev
Cc: bmarzins@redhat.com, thornber@redhat.com,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	den@openvz.org
Subject: [PATCH v3 0/3] dm era: a metadata device that never comes back
Date: Mon, 30 Nov 2026 19:27:00 +0100	[thread overview]
Message-ID: <20261130182704.2728591-1-den@openvz.org> (raw)

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.

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

Changes since v2:

 - patch 1 releases the block allocated for the copy on the paths that
   fail, which v2 left leaked. v2 argued that releasing it is wrong
   while the space map is in bootstrap mode, where blocks are handed
   out without a count to decrement. That was wrong: sm_ll_extend()
   calls dm_tm_new_block() in exactly that mode, and its error path
   already decrements the block it allocated, so the two neighbours
   differed for no reason. Reported by the Sashiko AI review.
 - the unwind label that takes the original's reference back is named
   for what it does rather than for releasing one.

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.

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 | 13 ++++++++++---
 2 files changed, 19 insertions(+), 4 deletions(-)

-- 
2.55.0


             reply	other threads:[~2026-11-30 18:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 18:27 Denis V. Lunev [this message]
2026-11-30 18:27 ` [PATCH v3 1/3] dm persistent data: put back the reference a failed shadow dropped Denis V. Lunev
2026-11-30 18:27 ` [PATCH v3 2/3] dm era: refuse metadata rpcs once the target is suspended Denis V. Lunev
2026-11-30 18:27 ` [PATCH v3 3/3] dm era: construct the target suspended Denis V. Lunev

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=20261130182704.2728591-1-den@openvz.org \
    --to=den@openvz.org \
    --cc=agk@redhat.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=snitzer@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=thornber@redhat.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

all inboxes | Powered by JetHome®