From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id D809780474 for ; Wed, 28 Oct 2026 13:22:36 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69SDLHJg020300; Wed, 28 Oct 2026 16:21:18 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69SDLHJg020300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1793193679; bh=CzRhBpV/sIF7CBwjUShrQeURQyjHipRsC/SW1kciNIQ=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=p3JHIoMKGYUTZzAauL26mMWyF9ZDyCyy3eAvrqmXn5bZqZkfIf109Z4vhf4qQ1N3A wIxYAzZHAPn1DEoHYurd4A+F3ZWLmVtqDnNn93X85SZZSSSfGvSt87ctPlDOM0ZIZg jwXlULzDb4mz+foU1ZeMGppZMmKLEZDr/uPtsdx7WmizVTmNwcz4aojdMisFmpw+px TlggFUBbWNwywKAvsSXpYxRizuY8PzAvpiOt5xw6MaizG2VwxFvMH7g3kDiEsHzjbL Hf6ZS00CYka6GXDgLIt96ymnp5CwAUYYxLtYoQ+17vD8yvCV/nGIhUjyfoRX6cSTZW la8Ik5VNOw05w== Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69SDLBkU020284 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 28 Oct 2026 16:21:11 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69SDLBkU020284 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="Dy6PudY3" Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4a204f135ffso5753445e9.1 for ; Wed, 28 Oct 2026 06:21:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBx7ZVwRbORPzHyFz6toFohEcaFAcG6VHeBws9f6HLTTUmkJX8Aei3bZfnSY6brRp5DJxCz+TQ==@openvz.org X-Gm-Message-State: AFq9FYJWYaBbQyRiFIi60cSx5ZqH7JbQ8Ikeaz9k+YOE3cfjl5KnWbRm tv14exjy2WWbkoaPuzkDyjU+ojMPcLlFLBLeQArqOoPEGRv/K4MWgfF2wX2re5enUWo/Rt+J1xd nxBkAdt10bYiCIX4aUlk2Nt3IHeCHwdcsZpB5hNAcbPIxhEDaHgqWww== X-Gm-Gg: AYBFou3Snw4izwSWlCgSmK7Qll08kK0Hlkmu4X+y5LCWp/xtbRaG1P4TClyRt34W2Vm eKvau+4dgMryoPVSodegKIlcLTmJLMitFSfK3ngLKI3TXEr+o3+ZnWsCoduNobcVLK5fba2tNER UJNCtxXBkFNRpyU/dtv9sAtAvag4Bxo2naKJOLy7bmECRyiqu9hjWpw5YElwdTJRWkbccFlU9HD 4QFlJW8c/cDfltCMpwOuQDmJ8wAxex274DGzGC8zdFClpRgbe0HSiIV72GyZ5XFvjN8Zu51+FZZ mB5+t9902w== X-Received: by 2002:a05:600c:6814:b0:4a7:b304:253e with SMTP id 5b1f17b1804b1-4a966e2b5b2mr49177285e9.22.1793193670896; Wed, 28 Oct 2026 06:21:10 -0700 (PDT) X-Received: by 2002:a05:600c:6814:b0:4a7:b304:253e with SMTP id 5b1f17b1804b1-4a966e2b5b2mr49176555e9.22.1793193670340; Wed, 28 Oct 2026 06:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793193670; cv=none; d=google.com; s=arc-20260327; b=tAbJVPW1v4YrryTvx0mIaw2X52WLgiwpXWXgqdA5b8qGfqfSl9wCMtdaWpbeUQdZ8N ilNKLMzjBETkiemZjp0C/M9YylGCKn/N2lnvLiT4akl5uBDyoVe/Nl5QfOp7KynBLgJ6 eiqIYbYzndBuxOq3Mg4g6DVQjJXyX/OSIVjshm4NhZyaEm0dYD4PYw1MEznqx5iA21hn +um/N2+MfWFfRsj0lnakSX5i90AnCDkUmjWYKEn0EHKSjoaSwQCG+ERKIx14MoYXCVOK Hr2g3DDSXg+IFN1UbbDtW95OX7s6bcqHFZDwjrRCch78cN8i3KmDrL4KyG25YJwXDpji KJzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=IaTBeD5GT4fdBRicIkXHe+wwgP7lrGNkcjhBrON/ueU=; fh=78BC7tS8NmqDfv3Bnhfi9RcAZHiIqni0Dz3247Q9j3s=; b=UPDMJWcDmQp1OuqGfFRUIgXdn8CofBxezuJaLOoEe4gL0RsBMfV5BAweB51UJXHjYJ GISax/wIyleNSvRCrQpziYtLGA3GQtrDAUSow20o0gPf/JjiMzK89h7ixVls70cw7IPi UGjTKweJg7Fgwwo0FwkD+Qb/fMkSSHI6nZsijgKafBmFACQa/UC9JN5ivGhJ8M+mfwK4 V8eeznDZ0nhF8r4/cTO6W7o1uSnWpuJEwGlJS7rEyxUcGo0R6mttqdBvDblTRMR6wyY/ EMTBV5zMA46lAMmeqmO7+meqPvoRQTPec3FtO6z8kSU6eSRf5/0WAg2wyqsY6hvRJOt1 REmw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=Dy6PudY3; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-48e55fa2707sor972641f8f.13.2026.10.28.06.21.10 for (Google Transport Security); Wed, 28 Oct 2026 06:21:10 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) client-ip=2a06:5b06:b600:300:2c3:d099:6fb:56cf; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=Dy6PudY3; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1793193670; x=1793798470; darn=openvz.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=IaTBeD5GT4fdBRicIkXHe+wwgP7lrGNkcjhBrON/ueU=; b=Dy6PudY3hrFhlf1whB4m3ndSHHfOry2WT/VRD5jJdknK8fOuG6MrsKYrmJZaHRBFre ER6AqsMUuwKC1oGJVLnbheY/DI3CdltD7vhmokbe18MufoHClRXPALrGyD0pAbVFHoh4 309S3L5c/2CCmaQJ5lKkr4cqw2oM/i8zaNZc3CN4eddW5GAkzLsd0wtqaTUV6fG5kMrq NMRko8Z4j8MJR8RHJ7jyObvMoOpxJ8GfEUPTQ6QDOnzFI4K3th49GAK8psdcUl8idOr7 kfuz963END7l7iDZ6NK57O2etF5WpH+F/sCcC8Cid4y3pXth2TrqzXK8vPyOdTzzYGgN SdjA== X-Forwarded-Encrypted: i=1; AKwUvBzAPx/nBswtsGaGk+KLYG0iL8/rOfPcJ0NkKm3w5+KbDyqFOXDYhw60Gp3tqfycaZeinSX6Bw==@openvz.org X-Received: by 2002:a05:6000:2a8a:b0:48e:4300:c6d4 with SMTP id ffacd0b85a97d-48e5d5e0178mr4624781f8f.53.1793193669781; Wed, 28 Oct 2026 06:21:09 -0700 (PDT) Received: from athena.sw.ru ([2a06:5b06:b600:300:2c3:d099:6fb:56cf]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3ecd3418sm25625739f8f.41.2026.10.28.06.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2026 06:21:09 -0700 (PDT) From: "Denis V. Lunev" To: andrey.zhadchenko@virtuozzo.com Date: Wed, 28 Oct 2026 14:21:04 +0100 Message-ID: <20261028132104.2885097-3-den@openvz.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261028132104.2885097-1-den@openvz.org> References: <20261028132104.2885097-1-den@openvz.org> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 2/2] dm-qcow2: fix a merge reporting success after a failed write X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org From: Denis V. Lunev qcow2_service_iter() collects the status of its service qios in a function-local static shared by every dm-qcow2 device, and resets it to OK when it starts. A merge or L1 COW break starting on one device while another one runs wipes the error the other one recorded. That one then finishes and reports success although a qio failed, so userspace may complete the merge and drop the top image, losing data that never reached the lower image. Keep the status on the stack. The qios carry a pointer to it, so the function must not return while one of them is outstanding: every exit already waits for service_qios to drain. Fixes: 222b6f1291c1 ("dm-qcow2: Introduce driver to create block devices over QCOW2 files") Signed-off-by: Denis V. Lunev Reviewed-by: Andrey Zhadchenko Feature: dm-qcow2: block device over QCOW2 files driver --- drivers/md/dm-qcow2-cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm-qcow2-cmd.c b/drivers/md/dm-qcow2-cmd.c index 2865940cff30..c7e77677d8e6 100644 --- a/drivers/md/dm-qcow2-cmd.c +++ b/drivers/md/dm-qcow2-cmd.c @@ -65,13 +65,11 @@ static bool qcow2_backward_merge_should_stop(struct qcow2_target *tgt); static int qcow2_service_iter(struct qcow2_target *tgt, struct qcow2 *qcow2, loff_t end, loff_t step, unsigned int bi_op, u8 qio_flags) { - static blk_status_t service_status; + blk_status_t service_status = BLK_STS_OK; struct qio *qio; int ret = 0; loff_t pos; - WRITE_ONCE(service_status, BLK_STS_OK); - backward_merge_update_max_progress(tgt, end); for (pos = 0; pos < end; pos += step) { backward_merge_update_progress(tgt, pos); -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel