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 D7BC18017D for ; Thu, 29 Oct 2026 14:45:21 +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 69TEi3aR001304; Thu, 29 Oct 2026 17:44:04 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69TEi3aR001304 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="DmFp89IU" Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69TEi1Ml001288 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 29 Oct 2026 17:44:02 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69TEi1Ml001288 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-48af4046a3bso1851332f8f.2 for ; Thu, 29 Oct 2026 07:44:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBxRBo79zzKv9aJ2s6iAjGPA33yhLHcUWshMBbhE8u8KBWP3FqaF/2soKX0sRFIefwc2NLfoOQ==@openvz.org X-Gm-Message-State: AFq9FYJPu/XUkwtEDVG96Kz8gJTG5avfQ6px7H+DdvljbceavnacIvS+ OoL2laQcj3/S3rSvqnUgaayYxoGpNRgHfQUJrUa0ham3A2ybrL/zOf2i/RuGwyu0Fxgy0nn8pmk 8RSbdK0HZ4lRKpfZ+iayQTKyIQf6EXiugOFlPtF71NFkXX0UscO1Kvg== X-Gm-Gg: AYBFou0sQLY4wQ9rt5AIF01Ba+RbE0ga4+TuxjEl5IIei1Q1wt+MImLwKhPQSy849s/ 9y96nbggJ6YjiuMqzP9devMZpe66uc9HRhFNrT+ZpJQzbDu5C1CwTECmw2Le/nYCwQ/IVHJjZWm kxi6S+cBXrltydK1wKUgkBjZiW2f3Ou1iA+yqZ88MANjragE4caQtrkkf2hZveUEOvaMMsVvTYn XuIjD1OGqO9mZNxRbgddyguny1CBUgF0fSIgaTe+gNfpCX3oM4jsneGBPJBiGZ0yqhzF/iWJtbu WZ1E06fUglgEvPUplgPvy9ubfsnldX6zEaq5Dg8waWAMoRexn0KpQ50nMh0GMvD6lihukYNUQx+ Pozjm0QEv1z8522eP9xmeG0RZlVse X-Received: by 2002:adf:e004:0:10b0:48d:ec3c:3247 with SMTP id ffacd0b85a97d-48e5d30dce2mr9931797f8f.44.1793285041486; Thu, 29 Oct 2026 07:44:01 -0700 (PDT) X-Received: by 2002:adf:e004:0:10b0:48d:ec3c:3247 with SMTP id ffacd0b85a97d-48e5d30dce2mr9931743f8f.44.1793285040942; Thu, 29 Oct 2026 07:44:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793285040; cv=none; d=google.com; s=arc-20260327; b=Z9eSOsNod3cOmeRZeX3GKA8T2ErHvRJ4qYda6sJDmWXe1gYUIPVfFgBgNCYeo5GONf 2MKrcKoBSDoHB6VRuyF6cnqBfdM8XSBA7TViKO2ciHsJZDGUdviINyAjNmH37z00zwxT 7xGnDwk5DIcU35lsoBZdiokty9nyXSafovyxR87IY0B7a8Eef8DbKiS4x6GmDsNHwHFa KnBaIbCRBi5H73ylAuX4m53JF+/c/3iCYqP0QndtJMsqXsEB00qU8KVLEvkPTmSWw4yr riHvFd7RhADVthX21XyigCzY/tfJCzD8D4R1p6DJGBCCFKs0LNbokLrh+OVesKAYqzvY OOSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=BjFJrDHSeOqEaYKHWWiSFNZakFJWi6lGuy9Z8s7xJkY=; fh=CMILZ+goaghq6B4UpCDhf0EQp6kYD0LAlmOkUiVCOvs=; b=MPxpaYL6TV3ffHLinU0BrliscJ2tEl87M2IwJydj6PuJOuhUwzEEbOxH31H3AkoBDU mIzCptoX0QjbFw7tm+SlVLYYAFtvkVNWYoWB8nXhaVXa/8ZH7EGZQJOkGeBx0uykGaEi mu158twighLum9McC3gCiIMeVQjkDjo62ul7ev6SRsh4Kzaq9ed1uId0qMqdTXqAgeZy o+7nZ9GGFVjpQl6IJm4Yo74wyibEldLSx7YH2Y6iEex8BY77Av3GWq8ZlrW4UslRT5ff LxKFUAtK2WEUohAyMPAfIyjXpdEm4ICbKE5p/piiE1CYfduHe5qODxPNDKIUJo+VIgT5 +w7w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=DmFp89IU; spf=pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=alexander.ivanov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-48e4e01482bsi26612531f8f.500.2026.10.29.07.44.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2026 07:44:00 -0700 (PDT) Received-SPF: pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=DmFp89IU; spf=pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=alexander.ivanov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=BjFJrDHSeOqEaYKHWWiSFNZakFJWi6lGuy9Z8s7xJkY=; b=DmFp89IUlU90 T6HK/qfnsktUORp4U67ZOJkvkjN0gsE+jaGuN78mjwg0eD53aMFdXnGf4WfPjjpc/N4Z44G2GGnCA H/nSFI6gaHp+vT39t1nJdnzzzCkDgwpRYnUwqmH8YhWWngZtLIwrDIk21I9NjnR+LaNY64Q6ESlwj ub7D/HKnTwbYBCqu+lpESOQ7Czs6ERBtru7x6K4IXfTQpaMBiMypMGJ9Yc8vG9Nx4gxo9oY28t/tD 49G1j178ObFuxZShKK4v88WxLbfynXCrLaU2UaTW9DBstdJ9vPK2eW9HO2j8REBtnlm0X0iSuuGJ2 WSpZgqS5E0gzYVDTuM2Rjw==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=sky) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xMRIS-007b5D-1v; Thu, 29 Oct 2026 15:43:58 +0100 From: Alexander Ivanov To: andrey.zhadchenko@virtuozzo.com Date: Thu, 29 Oct 2026 15:43:55 +0100 Message-ID: <20261029144358.3384569-1-alexander.ivanov@virtuozzo.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v2 0/3] dm-qcow2: keep images of a read-only table unmodified 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 A read-only dm-qcow2 table does not protect its images. Writes to the device pass through bio_check_ro() with a warning and allocate clusters in the top image, the unaligned tail of an O_RDWR top image is padded on .ctr and .preresume, and merge_backward modifies the lower image. Since the header is not updated for a read-only table, persistent bitmaps stay marked consistent while the data under them changes. Patch 1 makes an image writable only if both its file and the table are writable. Patch 2 fails writes to a read-only table. Patch 3 keeps the bitmaps autoclear bit clear if it is already clear in the image, so that a later writable open does not revalidate stale bitmaps. v2: - patch 1: describe the tail padding and the discard and merge paths correctly; point the EOF read comment at qcow2_parse_header() - patch 2: drop the comment on the read-only check - patch 3: drop the comment on the autoclear check; add a Fixes tag https://virtuozzo.atlassian.net/browse/VSTOR-138887 Alexander Ivanov (3): drivers/md/dm-qcow2: treat images of a read-only table as read-only drivers/md/dm-qcow2: fail writes to a read-only table drivers/md/dm-qcow2: do not revalidate inconsistent persistent bitmaps drivers/md/dm-qcow2-map.c | 10 ++++++---- drivers/md/dm-qcow2-target.c | 10 ++++++---- drivers/md/dm-qcow2.h | 3 ++- 3 files changed, 14 insertions(+), 9 deletions(-) -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel