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 49F6180027 for ; Wed, 25 Nov 2026 01:08:34 +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 6AP17Abl032284; Wed, 25 Nov 2026 04:07:11 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AP17Abl032284 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="XRKSw4Ar" Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AP177Fi032272 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 25 Nov 2026 04:07:08 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AP177Fi032272 Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-8b3030bd581so77300877b3.3 for ; Tue, 24 Nov 2026 17:07:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AL+hErF5zywkqVxsxHlAf4+///aQCRMk6ZmEiSWmEc6+mxWftgE6SyhcJxVVR7sbrP8qJ5j4nLnMpw==@openvz.org X-Gm-Message-State: APuU4Z/cfQ9l/LJDCHUh85MtBnqFV9zmvyCrckcj+wWaKk7aAywD/Zfi ejaKWGzcemii8UB08IFoPSz7rwOQ9u15wxHYKF7Tg8fk+Hq3f72iulfsOJrRWWj6WbBMocmRatr zsfKtZv4bLaAScGXxHJSyoIz0uo6Ino60nxmNeYw3K8Zekscf7lgCwA== X-Gm-Gg: AZFdTZdoiF0JU/LqOMRYbx4MZEzsv5+ehptAb3d5Pp3VG3MzRhul9/cjPTQwKcrIdHs 7C966dkNNL/qqhzhVpw+vXHT36whqBf1J4uLHkBuJ8tCoKrhQDCjto2ZoTs/O2l+wraPiSBVL3X JjhXS5aRm4VE1qqRrKcbY7bdmSVIJluvwe5PxlacWSfHtug2Si1i7Bmdf79Snc4HmcfRt4Pm2ZE o9G3478Y2noCqTlaL0h8DIR/ie8lZj5ZLk3ZD7Bl2jeGmKp6mxxsNXlSuPr+6d1sP1pt0okuMee 1Kzj7nBQ+n+WWjBTfERwOwZXoEemEeejq41uz/N1TPZ6fbMF2BR/+Zn36X76/KEhKm6AIDqJG2q oFAz0niRiCwWxiTX0vZqobSkGyzh7mXtU/PoNYIDormYYnEDtQMyEdzPupnbz/5DjPXDgaJdHwf YJFaTyiBxipEWyZ6arf6mVBssd5EU/JQI2 X-Received: by 2002:a05:690c:9b01:b0:8a7:6a41:12db with SMTP id 00721157ae682-8b52032b320mr62378877b3.7.1795568826990; Tue, 24 Nov 2026 17:07:06 -0800 (PST) X-Received: by 2002:a05:690c:9b01:b0:8a7:6a41:12db with SMTP id 00721157ae682-8b52032b320mr62378787b3.7.1795568826134; Tue, 24 Nov 2026 17:07:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1795568826; cv=pass; d=google.com; s=arc-20260327; b=JoC+VbeSZhdHy+Vcl/RQL2zlWiVUZt4LTX3IZx3vi8lw+9/vRI5xDO7s7jak1KkjAL GE4vuNBgxr5x+bH8cjSHSoFH48M9dY89pWbBZ0VvTbp+pxNps6XDXjh7GE6tlV4Z6Gnb omLS5l7Q/+lsctOWjKci5QtpIaPR2/IlGAq59Gw5NHJXTi13v1kCiJ5PNzKU+2RTYYjh a0/9O6okDclmrEzcaIKWN1oTTeuQr5YuBPncfy59MpDQLBk4PL2THs3WJ81HFNDug2vT F4seydw5hjZcl8EVWQLrgKtRT/cZsQgaeXjKpGLJKtym9WQ37FAk7TftYNpKq9rz16Q8 tMcg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=mime-version:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:date :message-id:dkim-signature; bh=RH89KRUNvcVBq1S0jH8t95EZbGi/eB0bNsKAhxi2leo=; fh=jDS0I1cpW+XfwrYet6StLpifge6tigwqhGQOwF5vma4=; b=UFo9eb1MDChJmNtqWCJYg9fcymRXeOvzL+keZk6kOBYh8wMsvsiMsHiporImyjKAbT N/ufo2GlO9A3EUmpCTJAvviMIxR6cLVtmJyoUjGxgF1cYv+ZRmV8z6Xp3t8/j4cpTKKw BdvA/5XmVfFiHF/V3bLVfZ2rlZvad6ioSPzLcec6X4d+TBk1tqewjn7zOI0mrFPy9bED DAi2y+wfmMuKRvvj/mpJaP+jJiRaWQNyFjoeCVRlfc0K9a+A245biutaW2HEQwm0u3Ww lEcD7ymTsy1Noi1PW+UwgkIYN7JjNMalLZTJAKHyYLmLeA3KdfuQa4lg/V+7oYrXmXTk qrIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector2 header.b=XRKSw4Ar; arc=pass (i=1 spf=pass spfdomain=virtuozzo.com dkim=pass dkdomain=virtuozzo.com dmarc=pass fromdomain=virtuozzo.com); spf=pass (google.com: domain of andrey.zhadchenko@virtuozzo.com designates 2a01:111:f403:c201::1 as permitted sender) smtp.mailfrom=andrey.zhadchenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazlp170100001.outbound.protection.outlook.com. [2a01:111:f403:c201::1]) by mx.google.com with ESMTPS id 00721157ae682-8b52040f84csi57129227b3.239.2026.11.24.17.07.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2026 17:07:05 -0800 (PST) Received-SPF: pass (google.com: domain of andrey.zhadchenko@virtuozzo.com designates 2a01:111:f403:c201::1 as permitted sender) client-ip=2a01:111:f403:c201::1; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector2 header.b=XRKSw4Ar; arc=pass (i=1 spf=pass spfdomain=virtuozzo.com dkim=pass dkdomain=virtuozzo.com dmarc=pass fromdomain=virtuozzo.com); spf=pass (google.com: domain of andrey.zhadchenko@virtuozzo.com designates 2a01:111:f403:c201::1 as permitted sender) smtp.mailfrom=andrey.zhadchenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TPG8g+hjRxjPo+XoEYmofpr+hdIlHMeFzoiRVxCuk0stDpf/sNCGJhX9CBLa4Q3AUi0bEj9jYiWik40njoF2d95ELmFykAYPdnejyHOmrQqjMG/kRqtc1jyP03Xg33xfmMxz34GTEwSTy3YCfeyaR9f9UFT5k8IDC8oifNHb+82I4W7DHz5P9t5F6zhgDapB8vxt0XR2ewKy8u93lLIsc/bMohsEZ8BGDjsz+RYh3gUeYUMQrRKAK7UyaRlSq5c/oiO0oclgFJxx3DcCYt/21Ozzh7IAB/Yx99IrnHUjRcnm5DF7IBkDOnnbKklNUjdu+fFpGdZavIJIi/utbrMcxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RH89KRUNvcVBq1S0jH8t95EZbGi/eB0bNsKAhxi2leo=; b=eSR7FPPV9sofKHIZHLQSIVMFJgI9Xpvx2Gz/JQb5ThVvNIAHw14ocAdzezKLsabq6NJmG8KuSYKb2at854s5Nfeq5g9R9H1LVaCeAERVOAxqEk3WEFRmY2awxXcnIe7zbK6znzNHqJ2jaDThAXVWQHrYtW6uXKYVJ3paMu1aLc17K9FTNm7ijKCBKiD8ECihcoJ0O2sANRzvznNKbSOh8u0jvriCXyMrkdHUyr2ZoMDL4x88GOVClTIZL5NRuVtWu5Xyh5ZG0+HoP/uBT9x3gyfm8dLNA0fzxU5VShElPAYaayUcerlg1zuUDjNLyyQXIupbDk+qqOsmbd5l5R9ssA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RH89KRUNvcVBq1S0jH8t95EZbGi/eB0bNsKAhxi2leo=; b=XRKSw4ArGqydBbpFDbTa/DKQZKm0+LYDX3OFJk5rOfe0Ntt6D4jIvW7/Emeo4EjZ+ANXoSh2F5Lb7WnL1GuqcN8Do8+R66ArpuZAF6l2cYTVtVeORLd+7BJm9cEU41XYjM3RLJSpkvN4S/QaQHrae2B/U3pAzH5/GsQzGCSrfRKexcI+iUMDFJ+pa9JqQeKnDjgwPsoaGICrI/QyUbhkQdAZrTaa4sluRAiB/Yq61/gJylIFjU5BkrlXMACDZkrzPdHWgpA/OEvtnGtAjVKsnP9Q/0u3hnozJJ1WkHGUj3w2rfy16KBrwdmKV2aG3MGfeHr4cWYOxlZtKSzbdSLiZA== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; Received: from DBBPR08MB6059.eurprd08.prod.outlook.com (2603:10a6:10:202::10) by GV2PR08MB9304.eurprd08.prod.outlook.com (2603:10a6:150:e2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.639.13; Wed, 25 Nov 2026 01:07:02 +0000 Received: from DBBPR08MB6059.eurprd08.prod.outlook.com ([fe80::fb27:b8f7:2c54:34e0]) by DBBPR08MB6059.eurprd08.prod.outlook.com ([fe80::fb27:b8f7:2c54:34e0%5]) with mapi id 15.21.0662.004; Wed, 25 Nov 2026 01:07:02 +0000 Message-ID: Date: Wed, 25 Nov 2026 02:07:01 +0100 User-Agent: Mozilla Thunderbird To: "Denis V. Lunev" , alexander.ivanov@virtuozzo.com, vasileios.almpanis@virtuozzo.com References: <20261124124613.455047-1-den@openvz.org> Content-Language: en-US From: Andrey Zhadchenko In-Reply-To: <20261124124613.455047-1-den@openvz.org> X-ClientProxiedBy: FRYP281CA0007.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10::17) To DBBPR08MB6059.eurprd08.prod.outlook.com (2603:10a6:10:202::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBBPR08MB6059:EE_|GV2PR08MB9304:EE_ X-MS-Office365-Filtering-Correlation-Id: 22ede308-9c95-4759-749f-08df4a9069db X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|23010399003|366016|1800799024|18002099003|22082099003|56012099006|261021135927099003|261028144727099003|261026135527099003|261102123227099003|261021123027099003|261022115727099003|261021121427099003|261022105027099003|261009223027099003|261026121527099003|261022075727099003|261026140227099003|10067099003; X-Microsoft-Antispam-Message-Info: WGyTMItryQHetYNmbhjPiZTVIDm3ogWzDALYpfsb27tGOBeS2vTiTCc6+F/Iaksdj5HoZm258rywSxG1nzevRsqOlH4/xG98koJ9WV1H/gbZdAb4vGHDHx6g2LDFsiyFQAXBPa/eahxESAq+NwCNmcdDmzmQ6k0qL/YYyjIuFZftj6hY+5ZoPvqeJxRxasFgmEV1vVm839yqSO4PJX+IPgQ/k0wocRfnJwPGm+ED02Pcq9ev5HmSWqI1EZpeJcZ70QKQnKrxlVd0JKE5lv5j+Un2lU9swZpEI0tG1YCtG5pD+XgvsDo8yx47UTRhjMPIQJTLB6YpxeXEKqmX3knS0UM+9yyzUsDyr5Ej7BGwKZB5WQue0x+/fcJQo3kySt4HCEF5mtnTuIiDpjWAq6Ns48ExQ0ZGKDzdMsP95P0FLYTlnQ9qwLGg7D5WZKtTVuDBA0cToEKl/deSk6+aDjSRy+WCU0LYPyl3KCCgFEuhruVRasi5RziO2PEhTp22R9lUTNVEvvOvrTKXubdSBap7JE7O60K0ykrZFHOmTE+pq541tpTWwFfOf8yiIuQByshbbkjBM6ErOpUadJprN3yiBKZ/0YyQgqb8tLVMLXzX1dBQA0PrtGqozap6b10/snLu X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBBPR08MB6059.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(23010399003)(366016)(1800799024)(18002099003)(22082099003)(56012099006)(261021135927099003)(261028144727099003)(261026135527099003)(261102123227099003)(261021123027099003)(261022115727099003)(261021121427099003)(261022105027099003)(261009223027099003)(261026121527099003)(261022075727099003)(261026140227099003)(10067099003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UC9jb1doSUEwM25mVzNGaS9XYkhUNzhvRjdUVHljRWpRcEpEU3AxZUFodU5p?= =?utf-8?B?WkdtdnRJZEpadUE5emZtOGVnSnBRUjEvYVhwdTliSm9FVmZEWGIrajdXRHYv?= =?utf-8?B?YjNNbDM5d2tZcVpyVHBXTUdrOEZEVGYzWnExQVlKV1lNYXEwT2FlMmswWWlC?= =?utf-8?B?bVFyVklDMjBJVUIrK3FFQ0NzSVpZVFlPR1A1MVdvT1YyUHJrUkJFY1lEUjlR?= =?utf-8?B?cjBuam5TQlFCeElTSHdpVkc2eWtaTzhtU3Fzbm5zb250MStlbGVrL1RqaGNW?= =?utf-8?B?Yzd6NDRiSGVPODRBUEU3bVpkbm1iYTlYbW1hekdBVTNsbS9Td1ZxZnVXbnh2?= =?utf-8?B?MlFWSUZDYnJSWUo3N2p1S3BMb2lRZUozdXdPaU84Q1dPb2NYaWh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L2FCbm1wZXc3Mk9McmUwdjRwYWlpcWgxbHpTQ2NnYmpX?= =?utf-8?B?UmxzWS9ob2R6b2c1R3c0VHhDT1piT0F5bkF3TTVFSHM4TkNXdiswYVRBSkF1?= =?utf-8?B?RnlMNjBZZ2ViTjd0VFhUQXFMUEZCTVV5UnhOM0FZaU1wK2tCWVhjTW1MVlNM?= =?utf-8?Q?ikUvV7tfN8TRwDfw=3D?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22ede308-9c95-4759-749f-08df4a9069db X-MS-Exchange-CrossTenant-AuthSource: DBBPR08MB6059.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2026 01:07:02.4306 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iM4W5Gdu3kGsAo6KIb/3AuVikX3dBWezsJqBK1DaGmm7naSvsJkReECHiMYGgrah+XeFNiCg+FMIocFbLxG9NF58vfFVJFYAmocXvDTowec= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB9304 X-OZ-Fwd: true Cc: devel@openvz.org Subject: Re: [Devel] [PATCH hci-8.2 v2] dm-qcow2: fix stale host data showing in a zero cluster after a 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org On 11/24/26 13:46, Denis V. Lunev wrote: > From: Denis V. Lunev > > An L2 entry with the zero flag may keep its host cluster, and a zero > subcluster of an extended L2 entry keeps its part of the host cluster. > Their host blocks may hold stale data: qemu leaves it there after a > zero write without unmap. An unallocated subcluster of an allocated > cluster may hold stale data as well, since qemu allocates a cluster for > a write into one subcluster and may reuse a freed one for it. A write > that covers such a unit only in part drops the zero flag or bit, or > sets the alloc bit, but writes only its own range, so the rest of the > unit reads back the stale data instead of zeroes: > prepare_l1l2_allocation() reuses the host cluster as it is, and the > backing file COW of a write with one border in an unallocated > subcluster and the other in a zero subcluster copies only the > unallocated one. > > Send such a write through the sliced COW, as a write with a border in > an unallocated unit over a backing image already goes; an unallocated > subcluster is taken only when the write starts outside the backing data. > The slices come from the map as zeroes, with no read from disk, and are > written into the host cluster in place together with the data, so the > cluster stays where it is. only_set_ext_l2 cannot mark such an in-place > write on an image without extended L2 entries, where the L2 entry must > still be rewritten to drop the zero flag, so qio_ext gets cow_in_place, > set in both modes. > > As in qemu, the first partial write into such a unit now writes the > whole unit. On an image with extended L2 entries and no backing data > this includes the first partial write into each subcluster of a cluster > dm-qcow2 allocated and zeroed itself, which the driver cannot tell from > one allocated by qemu. > > https://virtuozzo.atlassian.net/browse/VSTOR-156774 > > Fixes: 222b6f1291c1 ("dm-qcow2: Introduce driver to create block devices over QCOW2 files") > Feature: dm-qcow2: block device over QCOW2 files driver > Signed-off-by: Denis V. Lunev > --- > v2: also cover an unallocated subcluster of an allocated cluster without > backing data, share the border mask helper with > qio_border_is_inside_unmapped_unit(), leave the unchanged lines alone > and reword the message, per Konstantin's review. > v1: http://lore.virtuozzo.com/kernel/20261123191317.199611-1-den@openvz.org/ > > drivers/md/dm-qcow2-map.c | 87 ++++++++++++++++++++++++++++++--------- > drivers/md/dm-qcow2.h | 1 + > 2 files changed, 69 insertions(+), 19 deletions(-) > > diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c > index 853e7a1230ee..2ab14fd939c8 100644 > --- a/drivers/md/dm-qcow2-map.c > +++ b/drivers/md/dm-qcow2-map.c > @@ -56,7 +56,7 @@ struct qcow2_map { > * read" or "sublu is not allocated" may be set). > */ > bool data_clu_alloced:1; > - bool backing_file_cow:1; > + bool sliced_cow:1; > > u32 compressed_sectors; > u32 subclus_mask; > @@ -1756,14 +1756,28 @@ static u32 qio_all_zeroes_size(struct qcow2 *qcow2, struct qio *qio, > return qio_subclus_covered_start_size(qcow2, qio, map->ext_l2 >> 32); > } > > +/* Subclusters of @mask that a border of @qio falls inside */ > +static u32 qio_border_subclus_mask(struct qcow2 *qcow2, struct qio *qio, > + u32 mask) > +{ > + u64 start_off = bytes_off_in_cluster(qcow2, qio); > + u64 end_off = start_off + qio->bi_iter.bi_size; > + u8 start_bit, end_bit; > + u32 ret = 0; > + > + start_bit = qio_subclu_indexes(qcow2, qio, &end_bit); > + if (SUBCLU_OFF(qcow2, start_off) && (mask & (1 << start_bit))) > + ret |= 1 << start_bit; nit: explicit 1U is better here > + if (SUBCLU_OFF(qcow2, end_off) && (mask & (1 << end_bit))) > + ret |= 1 << end_bit; > + return ret; > +} > + > static bool qio_border_is_inside_unmapped_unit(struct qcow2 *qcow2, > struct qio *qio, > struct qcow2_map *map) > { > - u64 start_off, end_off; > - u8 start_bit, end_bit; > u32 mapped_mask; > - bool ret; > > if (WARN_ON_ONCE(!(map->level & L2_LEVEL))) > return false; > @@ -1774,14 +1788,44 @@ static bool qio_border_is_inside_unmapped_unit(struct qcow2 *qcow2, > if (!qcow2->ext_l2) > return !map->data_clu_alloced && !map->all_zeroes; > > - start_bit = qio_subclu_indexes(qcow2, qio, &end_bit); > - start_off = bytes_off_in_cluster(qcow2, qio); > - end_off = start_off + qio->bi_iter.bi_size; > mapped_mask = (u32)map->ext_l2 | (map->ext_l2 >> 32); > + return qio_border_subclus_mask(qcow2, qio, ~mapped_mask) != 0; > +} > > - ret = SUBCLU_OFF(qcow2, start_off) != 0 && ((1 << start_bit) & ~mapped_mask); > - ret |= SUBCLU_OFF(qcow2, end_off) != 0 && ((1 << end_bit) & ~mapped_mask); > - return ret; > +/* > + * Subclusters of an allocated cluster with a border of @qio inside, which > + * read as zeroes over host blocks: zero ones, and unallocated ones when > + * @qio starts outside the backing data. > + */ > +static u32 qio_border_stale_subclus_mask(struct qcow2 *qcow2, struct qio *qio, > + struct qcow2_map *map) > +{ > + u32 zeroes = map->ext_l2 >> 32; > + u32 mask = zeroes; > + > + if (!map->data_clu_alloced || map->clu_is_cow) > + return 0; > + if (!maybe_mapped_in_lower_delta(qcow2, qio)) > + mask |= ~((u32)map->ext_l2 | zeroes); I think this is unneeded. We can just use ~(u32)map->ext_l2 as mask in qio_border_subclus_mask(): - In submit_read_sliced_cow_clu(), calc_cow_mask(..., true, ...) already sets unallocated border subclusters unconditionally - In handle_metadata(), when maybe_mapped_in_lower_delta() is true, unallocated border subclusters are already matched by qio_border_is_inside_unmapped_unit() && maybe_mapped_in_lower_delta() (which is also what catches a qio that starts < lower->hdr.size in an allocated subcluster and ends > lower->hdr.size inside an unallocated subcluster) > + return qio_border_subclus_mask(qcow2, qio, mask); > +} > + > +/* > + * A zero cluster, or a zero or unallocated subcluster of an allocated > + * cluster, may keep host blocks with stale data. A write that does not > + * cover it entirely must zero the rest. > + */ > +static bool qio_border_is_inside_stale_unit(struct qcow2 *qcow2, > + struct qio *qio, > + struct qcow2_map *map) > +{ > + if (qio->bi_iter.bi_size == qcow2->clu_size) > + return false; > + > + if (!qcow2->ext_l2) > + return map->prealloced; > + > + return qio_border_stale_subclus_mask(qcow2, qio, map) != 0; > } > > static bool qio_is_fully_alloced(struct qcow2 *qcow2, struct qio *qio, > @@ -3563,15 +3607,18 @@ static void submit_read_sliced_cow_clu(struct qcow2_map *map, struct qio *qio) > > WARN_ON_ONCE(!(map->level & L2_LEVEL)); > > + if (map->data_clu_alloced && !map->clu_is_cow) { > + qio->ext->cow_in_place = true; > + qio->ext->allocated_clu_pos = map->data_clu_pos; > + } > + > if (qcow2->ext_l2) { > mask = map->ext_l2 & ~((u64)map->subclus_mask << 32); > qio->ext->new_ext_l2 = mask | map->subclus_mask; > - if (map->data_clu_alloced && !map->clu_is_cow) { > - qio->ext->only_set_ext_l2 = true; > - qio->ext->allocated_clu_pos = map->data_clu_pos; > - } > + qio->ext->only_set_ext_l2 = qio->ext->cow_in_place; With this patch, every first partial write into a subcluster of an allocated ext_l2 cluster sets ext->only_set_ext_l2 = true. In process_indexes_write() WARN_ON_ONCE(ret < 0) assumed the first prepare_l_entry_update() already allocated lx_md->wbd and wbd->pe_page. When ext->only_set_ext_l2 jumps to set_ext_l2:, that call is the first one and can return -ENOMEM (alloc_wbd() / alloc_page()), which then warns and either NULL-derefs lx_md->wbd or completes qio without updating ext_l2. Would be nice if you fix it as a separate patch. > qio->ext->cow_mask = calc_cow_mask(qcow2, map->ext_l2, qio, > true, map->clu_is_cow, false); > + qio->ext->cow_mask |= qio_border_stale_subclus_mask(qcow2, qio, map); > } > > submit_read_sliced_clu(map, qio, sliced_cow_read_complete); > @@ -3785,14 +3832,16 @@ static int handle_metadata(struct qcow2 *qcow2, struct qio **qio, > /* COW to compressed or shared with snapshot cluster */ > ret = prepare_l1l2_replace(qcow2, *qio, map); > } else if ((map->level & L2_LEVEL) && > - qio_border_is_inside_unmapped_unit(qcow2, *qio, map) && > - maybe_mapped_in_lower_delta(qcow2, *qio)) { > + ((qio_border_is_inside_unmapped_unit(qcow2, *qio, map) && > + maybe_mapped_in_lower_delta(qcow2, *qio)) || > + qio_border_is_inside_stale_unit(qcow2, *qio, map))) { > /* > * Backing file is about data COW, and it is > * never about metadata COW (unlike internal > * snapshots). Here is data COW on L2_LEVEL. > + * A stale unit COWs zeroes over its host blocks. > */ > - map->backing_file_cow = true; > + map->sliced_cow = true; > if (delay_if_l2_dirty(qcow2, map, qio)) > ret = 0; > else > @@ -3937,7 +3986,7 @@ static void process_one_qio(struct qcow2 *qcow2, struct qio *qio) > } else { /* write */ > if (unlikely(map.clu_is_cow && !(map.level & L2_LEVEL))) > submit_read_whole_cow_clu(&map, qio); > - else if (unlikely(map.clu_is_cow || map.backing_file_cow)) > + else if (unlikely(map.clu_is_cow || map.sliced_cow)) > submit_read_sliced_cow_clu(&map, qio); > else > perform_rw_mapped(&map, qio); > @@ -4375,7 +4424,7 @@ static void process_cow_data_write(struct qcow2 *qcow2, struct list_head *cow_li > break; > ext = qio->ext; > > - if (ext->only_set_ext_l2) { > + if (ext->cow_in_place) { > WARN_ON_ONCE(ext->lx_level != L2_LEVEL); > pos = ext->allocated_clu_pos; > goto submit; > diff --git a/drivers/md/dm-qcow2.h b/drivers/md/dm-qcow2.h > index 4acddbe7c95f..c2460c2bea06 100644 > --- a/drivers/md/dm-qcow2.h > +++ b/drivers/md/dm-qcow2.h > @@ -325,6 +325,7 @@ struct qio_ext { > u64 new_ext_l2; > u32 cow_mask; > bool only_set_ext_l2:1; > + bool cow_in_place:1; copy-on-write-in-place sounds oxymoronic. I think you can remove this and just check ext->allocated_clu_pos as it is set only from submit_read_sliced_cow_clu. Or at least rename this to something more appropriate like 'reuse_clu' > bool set_all_zeroes:1; > bool wait_writers:1; > _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel