From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796063228; b=L5C+ZQ6zvU6LimaoD/euROkNAF0TG/U3Vidyj9yEayihoTXKHxGgc+6v2NVjXT7Z/38G yJhkL33OSzwHnaPIVUZU9VljvH7pMaVPSbSmoCd0ryOjzupRC5akvbsZHjsyUa1ldQeqB AFZz1rWbuGm8H5EP0JvjOb9eK0i8dkt3lRdMiInKUlelQMy71nhS6hZy/fpDBu4yiK7xI DWDGiSt7JsIxfDkkAH5nwxZMDtxXNypGE7mAuvHTc+qIuXlWRw2veOf68hvBrxeMbdypF TVRPhL0TTj8f8kiIk6encex9M/wxseePt2F59NA5QjEBPuyN7xKg2yJlH5ixO620cvA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796063228; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=hS00FiHSugPUVeI3Ms83PEyqxLDttPmXA3TO3JIteM4=; b=EZ0UUDR/CHfYOjoUZoPtjFEzUM7XfULw1ZTsP6QVeuQre2k6bIhvPTF4sKL9bEfJfBe8 T79gPDwL2MtCZyDzFd8DTuOZkxw0eAnE9LLY4H5vjtZYPrGHiPygG4dN/CRcOOJ/63Nu7 AEuy0voQalGryTJIyxh2r1KgBFIR9jz0tdqbGTIjM4wJiRPWnuQ60es4MwX8UGcQToMQm vi/8Hpz5M68Rr6V4pay8q8B0zjmno+f9TH7TppYgqAJUulH9sOdSO2Pa7s1Ets33DpcZL +YRcUmdJotenUUXZ4lSF93XjNCyVBJwUNhBGdlq7igpzyYDbsub2cMdeYEi9jAqQ3zw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=openvz.org; spf=pass smtp.mailfrom=openvz.org; dkim=pass header.d=openvz.org header.i=@openvz.org header.a=rsa-sha256 header.s=google header.b="ZqnV/YFe"; arc=none smtp.remote-ip=209.85.128.45 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62127606A325 for ; Mon, 30 Nov 2026 18:27:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 62127606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=openvz.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=openvz.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=openvz.org header.i=@openvz.org header.a=rsa-sha256 header.s=google header.b=ZqnV/YFe Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4bb6057b333so54296355e9.3 for ; Mon, 30 Nov 2026 10:27:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1796063227; x=1796668027; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=hS00FiHSugPUVeI3Ms83PEyqxLDttPmXA3TO3JIteM4=; b=ZqnV/YFelpj7VAv5+MuuHBKk8TzKakRVv0FX+7tZwEx0HLphzy0cvoD2tX+0nhROmI H4h6IW0/ChWs0U/mZHDxV960l+8+c6SodfVepNDx0B9dmEYTBRhg4MqTD8rtvncKZAVV 5kte13rDsMg+FxrCTWk/pXoMswrRflLozqAiqn79Ot6CNei6bi0BRLPheV78yRE3+7DW 0HRSAJ2fhRId0d9p+b0xlvV+zHFvIu8YJsLLyNXG5RGca8L8VceaoKCx6tAbd56yQB3h 5L/b5ynF6yavXegkjubBBEFhUynPBUFbD3rXvUbxsTNNvvtdErqYC8SNgZZllsL/nQQ4 HZqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796063227; x=1796668027; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=hS00FiHSugPUVeI3Ms83PEyqxLDttPmXA3TO3JIteM4=; b=myREdHCMeyxIGTrotxIpTsTrY58W5JHyfWHgt2bj61jeZJiDCJfhec62ejH3CVp09F YqletRw3qHZ94FjL5fK65TErx7wm659Qa+6g3iy8Rph9fEcJq+/LgqjOxxEZqewJ3ciF J3gt/r5+LOanKuMUpQq61dFXoTkcO5FPfqVGkxBg+sm07zeJG9tBCaCh6IW+c5Ky6EaG mH60MTidC+R+f4ynlSDO/hAhKHh4LWvFAo0p23tSEVeWUOBXcCVyrYcnjSz0iC2+D9Zs IMCfVvu4H+UKZPFxrBpeZslQgJssowej3iw/TTMkWlYZxGR5KGIMD/SxNfQBQfq5mGKJ 6eTg== X-Forwarded-Encrypted: i=1; AL+hErHM+5iktKzTYhI4wHzk/EwyEbGudgpew6BrIKu8q5w69up813Q9ciVqmlgfYM7Rgj1jDxywMiFoQKGKTLo=@vger.kernel.org X-Gm-Message-State: APuU4Z9xz8kmVAQYE9mCs97l1C5hNBfwkNg+RWBZB8L5C08YtV2han6C wkGzYNXrPzheAtUmFsZH9IYadK5FuBl/38+OM7fYUg+7aXRgvIODWYkL88R5revfUYzub1Y0nur omdJ0 X-Gm-Gg: AZFdTZcBRG+Ize0IXseDQz2O0+BJQpUk/VMJPAraImEUScQxXJRzjMXBko37al9qq8m VSbJuh0xSV0IBmNXxtHHuzlaLwqoD+WXhdgBhbcztNcv4AqFsidbt/0D6BZuYcfzRWfzrTzAOBr KDsd17Py15oCXR266Av08wAzNJpHGfvgsWi06tg5xbUVYWixmSbrLDRDU3auZV9AFu2SQXVJQZF ip2v1Ry0PXgMtr4tzgyZ4Gw0sj9x9NG/iuXz0geNaKwzq5/KGNqhkVxjuSQPAIji0hBy30+0IqB tRBluerEoD2U09hg/K7R4sS5AHUiqL82r1jx+V1r72JMfAeKQS6UDdelw7/H6JXBbICqHA3ouY5 IKmGU334Q9JKw73ccS3bh8OFDJiRj/4cINMMyzPBaC39uMRQ6sXPYOwFuZFlDxUpVcDDk20b31e 3jR+vbH4zn0AgxyMjp75SF7TrQIZylumNM5UgzMwbBzBQDONtsPlv+oLMjIP2pEyDTznny4d5um tOy2VEtqXdvbWUYmjqeQ8Bu/a/tJRDU1aALAS9XJft56wamiUxhNaodSpEjIrzP/turU/BiYSI8 f7hCxz6OeYiYRnqMKEbCliQYjRA= X-Received: by 2002:a05:600c:1546:b0:4a1:fc98:1cb1 with SMTP id 5b1f17b1804b1-4bb887c2cb0mr748299565e9.2.1796063226667; Mon, 30 Nov 2026 10:27:06 -0800 (PST) Received: from artemis.sw.ru ([2a06:5b06:b600:300:5748:a9a4:9c41:84f3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab65cb41f4sm63908482f8f.7.2026.11.30.10.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 10:27:06 -0800 (PST) From: "Denis V. Lunev" 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 Message-ID: <20261130182704.2728591-1-den@openvz.org> X-Mailer: git-send-email 2.55.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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