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 CEB3380C1B for ; Thu, 22 Oct 2026 14:52:11 +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 69MEowv2009810; Thu, 22 Oct 2026 17:50:58 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69MEowv2009810 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="kfWWazA1" Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69MEofN5009769 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 22 Oct 2026 17:50:41 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69MEofN5009769 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-48df02b91f9so611687f8f.1 for ; Thu, 22 Oct 2026 07:50:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBxwX+o3YnWciSo/KNtKKwnBuqEUMXl0n7fprTdbMODKv956t2fqv4E4qPVjsWAAyPNv2Y1Qrw==@openvz.org X-Gm-Message-State: AFq9FYK7ZW8xSOzZdviY4gxTkrGQhP8zXN61PJO5W5vzJ5ibxw/uki0K GSwAYWN8b+HFZanJLoN9MEjN2nLLMWUC1NwvVBv2bV401QnwSoE+feilvVQdRacnJXikmP/sCnv kMcXypI+RzhMi/0UFOdxIFfVAaC4+g9GTFoYeQMW9gQ2QwPuZWXYGeg== X-Gm-Gg: AYBFou0NVWtMPiIMfKpWcsvndGiJPk2/4CeqY/lSZTLTrRxqwlkm0MZs/Mm+umH9afQ 6xWul1NeM+Am2IEhtvLJhkzeI+RLeyCEEuAKwHQYiNj55f8IoqOROVV12tsKKQiCPEJ+ap0CUPg EkQ1z8khdo/KFagFSH9zF/fAhhBScscnxOvsfYnE6le+K6uaoAiX0XA2B5tRkIY/s/oJMhL7c1r jSdtSwd7g6Ldg+3JZt4Ci0feAFWykJMVshdhwLEI0G5Rt9DcV1KFUJfDchARJpP1skOW+1R+KXX U3PA80efFrbXJ3LB8bQ4rirwVS3G7SeJjcdnWzuFFjavDXr9buiohANfxcywvwvY9y55RntOqaN bv9aQtnYe0KliU4jvQZMpDhbaej74 X-Received: by 2002:a05:6000:26c6:b0:48c:5a7b:7573 with SMTP id ffacd0b85a97d-48e2d27be9amr5678585f8f.29.1792680640978; Thu, 22 Oct 2026 07:50:40 -0700 (PDT) X-Received: by 2002:a05:6000:26c6:b0:48c:5a7b:7573 with SMTP id ffacd0b85a97d-48e2d27be9amr5678519f8f.29.1792680640168; Thu, 22 Oct 2026 07:50:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1792680640; cv=none; d=google.com; s=arc-20260327; b=X+GeFtq6R3u44d6NDQibnStJFoLx86GG+NSdN7ZBhVKxOIZRIqEQJl7gdsDtVv5Ltl Xf4RBF/EEpI+2ekNv3yY9fnNKYFIzAEnUshN0vli7l6FNF1yBof4o13MFKvA72fznCqR aTDdnmRjS9uAI1IrwkUyvVf0FiDD1xynWT5NX9NcDy82S9aOKrawgYFfr5XfpmA1S/Qx dE9iFxh6PHJ1zCyKyNKFtjTMzN4vLooso+B4rc+CrNfHiWy9VgNbKnX49Hrh9BECsxlC Na3ToYmRYDZjlL2DnNHzyfWlG1QGgCkqb7VSf+5pWP9jVWcHvQxakNE95hETABof+n6A L6zQ== 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=lFBl78pi2++1xbbC6RyBPr3EpMkW+QvMQWq1PQboCKM=; fh=1MEQxOGYABaQPNQS1Ckioh0rrUOwgCYjd8t5csgx5as=; b=I8J3MRuWRufmU52RtpOeojhNZDHvgqZ+YEj8ctiO0BoWxKT8h2LupXLYkces0flDd0 NBO5UPpsNAfZGuh4vxdWant7mIQexekZRhnana2i+fhqf9NMkPo9n/SYB2554DKuArwP xfZXTqGCp8ars1cyE2KtIloJWHnBjsOAHnBVuErjnEFj9fSpLeKliXwkgxcCVmiCMpoG qxX7+bEcZKxT8gdcFXS/f7jcK/siNYNYteA6At/Cc0QxDF05zZEzMh4xrkMtwNbmY0LM gTPK1BziGyKF0EHds2mILNfhyTFo1atFIYYXUOFS2tHEdwRZ3EWSMeJjay5I71npL9df YWvw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=kfWWazA1; 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-48e254ec791si11542236f8f.8.2026.10.22.07.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2026 07:50:39 -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=kfWWazA1; 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=lFBl78pi2++1xbbC6RyBPr3EpMkW+QvMQWq1PQboCKM=; b=kfWWazA1KtJ3 mWwVwuLwVFyw7/7cgkKaZwMsS/1jZh0sR9fPC4Epb9uVmEVTsbRoYJz/iDvRlfmeOkLlK7m96nrPn 1o2N/e8K1y+tzwnf8dPSHmfON67INkD9qcSrhng9wJ0rQVxTd3lo27SwlJA04/1jCtUSoWzowCFAj y7/G4xMC4lDlfDGx50QrCsQosMyOQmez+u4hpwVb6qmTWW2MRAekxkcf8yFYR4cPNHJSEj6wXe/5Z TSrpuNtu+ZDE82hWXE6pgxyubqzN+cNVGZqjiGxH2ET6H3IEFUSptT/ix8jvn6f9roqoMsuyedRrT uNRxfjaV62PnFkPZ9+0+Vg==; 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 1xJu4D-00GYCQ-30; Thu, 22 Oct 2026 16:50:36 +0200 From: Alexander Ivanov To: andrey.zhadchenko@virtuozzo.com Date: Thu, 22 Oct 2026 16:50:32 +0200 Message-ID: <20261022145032.2128679-7-alexander.ivanov@virtuozzo.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261022145032.2128679-1-alexander.ivanov@virtuozzo.com> References: <20261022145032.2128679-1-alexander.ivanov@virtuozzo.com> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v7 6/6] dm-qcow2: truncate unused tail of image on suspend 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 Discard punches holes in place of freed clusters, so they hold no physical extents, but it doesn't change the file size. On postsuspend we truncate the image file only down to file_preallocated_area_start, i.e. we drop preallocations only. So if clusters at the end of the file are freed (refcount dropped to zero), the file size stays the same and the image never shrinks. Add qcow2_calc_used_end(), which scans refcount blocks backward from file_preallocated_area_start and returns the end of the last cluster with non-zero refcount. Refcount ranges with no allocated refblock are skipped at once. Metadata pages are taken from md cache or read synchronously. This is called on suspended device after md writeback, so R1 and R2 can't change under us. A failed relocation of the reftable leaves file_preallocated_area_start beyond the space covered by the reftable, so the scan starts at most from its end. If the relocation fails after the new header is written, refcounts no longer match the header, so set md_writeback_error there. Truncate the file to the used end. Fall back to the old behaviour on scan error and after any failed md writeback. A failed R1/R2 write leaves refcounts on disk stale. A failed L1/L2 write reverts the refcount of a newly allocated cluster to zero, while L1/L2 on disk may still point to it. Mark such an L1/L2 page with MD_LX_REVERTED and clear the mark on its next successful writeback, which rewrites the whole page, e.g. when a request delayed on ENOSPC is resubmitted. On md writeback flush a still marked page sets a new lx_writeback_error flag, which is reported in get_errors and logged when the scan is skipped. The flag is lost on target reload, after which the scan would trust the reverted refcount, so include it in wants_check like md_writeback_error: resume is refused until the image is checked and the target reloaded. Refcounts may also be below real usage after a crash, since both QEMU with lazy_refcounts and this driver write L2 before refcounts. The scan would then cut off clusters L2 still points to, even in a session without guest writes. With kernel_sets_dirty_bit such an image has the dirty bit set at open, and the disabled dirty bit check lets it be opened RW, so skip the scan for it. Otherwise userspace sets the dirty bit on every RW open, so the bit doesn't mean the image is inconsistent. Userspace checks the image before opening it RW, which find_unused_cluster() already relies on when it reuses clusters with zero refcount. Close and reload to RO go through postsuspend too. On remove, __dm_destroy() calls the presuspend and postsuspend hooks if the live table isn't suspended yet. It neither stops the queue nor waits for I/O, but the device is idle there, because dm_lock_for_deletion() refuses to remove an open device. On table swap, do_resume() suspends the old (RW) table before dm_swap_table(). So the file is shrunk in these cases as well. https://virtuozzo.atlassian.net/browse/VSTOR-148171 Feature: dm-qcow2: block device over QCOW2 files driver Signed-off-by: Alexander Ivanov --- drivers/md/dm-qcow2-cmd.c | 4 +- drivers/md/dm-qcow2-map.c | 96 +++++++++++++++++++++++++++++++++--- drivers/md/dm-qcow2-target.c | 38 +++++++++++--- drivers/md/dm-qcow2.h | 6 ++- 4 files changed, 127 insertions(+), 17 deletions(-) diff --git a/drivers/md/dm-qcow2-cmd.c b/drivers/md/dm-qcow2-cmd.c index 2865940cff30..1520733c962c 100644 --- a/drivers/md/dm-qcow2-cmd.c +++ b/drivers/md/dm-qcow2-cmd.c @@ -20,9 +20,9 @@ static int qcow2_get_errors(struct qcow2_target *tgt, char *result, int ret; ret = DMEMIT("wants_check=%d\nmd_writeback_error=%d\ntruncate_error=%d\n" - "merge_backward_error=%d\n", + "merge_backward_error=%d\nlx_writeback_error=%d\n", wants_check, tgt->md_writeback_error, tgt->truncate_error, - tgt->backward_merge.error); + tgt->backward_merge.error, tgt->lx_writeback_error); return ret ? 1 : 0; } diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c index ef832813b718..860095a59f4f 100644 --- a/drivers/md/dm-qcow2-map.c +++ b/drivers/md/dm-qcow2-map.c @@ -1091,6 +1091,11 @@ static int calc_refcounters_map(struct qcow2 *qcow2, loff_t pos, return -EIO; } +static bool r1_entry_is_valid(struct qcow2 *qcow2, u64 entry) +{ + return !(entry & R1_RESERVED_ZERO_MASK) && CLU_OFF(qcow2, entry) == 0; +} + static int calc_r2_page_id(struct qcow2 *qcow2, struct qcow2_map_item *r1, struct qcow2_map_item *r2) { @@ -1098,8 +1103,7 @@ static int calc_r2_page_id(struct qcow2 *qcow2, struct qcow2_map_item *r1, u32 bits = qcow2->refblock_bits; loff_t pos; - if (WARN_ON_ONCE((entry & R1_RESERVED_ZERO_MASK) || - (CLU_OFF(qcow2, entry) != 0))) + if (WARN_ON_ONCE(!r1_entry_is_valid(qcow2, entry))) return -EIO; /* The corresponding refcount block has not yet been allocated */ @@ -1363,6 +1367,8 @@ static void revert_l_entries_update(struct qcow2 *qcow2, struct wb_desc *wbd) if (cleared) continue; /* no cluster was allocated */ + /* L1/L2 on disk may point to the cluster */ + wbd->md->status |= MD_LX_REVERTED; spin_unlock(&qcow2->md_pages_lock); pos &= ~LX_REFCOUNT_EXACTLY_ONE; @@ -1386,6 +1392,8 @@ static void clear_writeback_status(struct qcow2 *qcow2, struct md_page *md, lockdep_assert_held(&qcow2->md_pages_lock); md->status &= ~(MD_WRITEBACK|MD_WRITEBACK_ERROR); + if (!ret) + md->status &= ~MD_LX_REVERTED; list_splice_init(&md->wait_list, wait_list); if (ret && !md->wbd) { /* @@ -2216,6 +2224,74 @@ int qcow2_truncate_safe(struct file *file, loff_t new_len) return do_ftruncate(file, new_len, 0); } +/* + * Returns the end of the last cluster, which is used according + * to refcount table, clamped to file_preallocated_area_start since + * the last cluster may be partial. Clusters freed by discard may + * leave the tail of file unused. Everything at or above + * file_preallocated_area_start is unused by construction, so the scan + * starts below it. Failed relocate_refcount_table() leaves it beyond + * reftable_max_file_size, so clamp the start to the reftable coverage. + * This must be called on suspended device after md writeback, so + * nobody changes R1 and R2. + */ +loff_t qcow2_calc_used_end(struct qcow2 *qcow2) +{ + u32 clu_size = qcow2->clu_size; + struct qcow2_map_item r1, r2; + struct md_page *r1_md = NULL; + loff_t pos; + s32 i; + int ret; + + pos = min(qcow2->file_preallocated_area_start, + qcow2->reftable_max_file_size); + pos = round_down(pos - 1, clu_size); + while (pos >= 0) { + if (calc_refcounters_map(qcow2, pos, &r1, &r2) < 0) + return -EIO; + + if (!r1_md || r1_md->id != r1.page_id) { + ret = qcow2_md_page_read_sync(qcow2, r1.page_id, &r1_md); + if (ret) + return ret; + } + r1.md = r1_md; + + /* + * The scan walks R1 entries normal I/O may never touch, + * so don't let calc_r2_page_id() WARN on a corrupted one. + */ + if (!r1_entry_is_valid(qcow2, get_u64_from_be_page(r1_md->page, + r1.index_in_page))) + return -EIO; + + ret = calc_r2_page_id(qcow2, &r1, &r2); + if (ret == -ENOENT) { + /* No R2 cluster, so all clusters it covers are unused */ + pos = (loff_t)r1.index * qcow2->refblock_entries * clu_size; + pos -= clu_size; + continue; + } + + if (ret < 0) + return ret; + + ret = qcow2_md_page_read_sync(qcow2, r2.page_id, &r2.md); + if (ret) + return ret; + + for (i = r2.index_in_page; i >= 0; i--, pos -= clu_size) { + /* Last cluster is partial if size isn't cluster-aligned */ + if (get_r2_entry(qcow2, r2.md, i)) + return min_t(loff_t, pos + clu_size, + qcow2->file_preallocated_area_start); + } + } + + return -EIO; +} + static int truncate_prealloc_safe(struct qcow2 *qcow2, loff_t len, const char *func) { loff_t prealloc_len, max_prealloc_len = qcow2->reftable_max_file_size; @@ -2387,21 +2463,21 @@ static int relocate_refcount_table(struct qcow2 *qcow2, struct qio **qio) if (!WARN_ON_ONCE(!md)) qcow2_md_make_dirty(qcow2, md, true); if (!md) - break; /* goto err_free_r2_pages */ + break; /* goto err_hdr_written */ } spin_unlock_irq(&qcow2->md_pages_lock); if (i != nr_pages) - goto err_free_r2_pages; + goto err_hdr_written; /* Connect new R2 to new R1 */ for (i = end; i < r2_end; i += clu_size) { if (calc_refcounters_map(qcow2, i, &r1, &r2) < 0) { WARN_ON_ONCE(1); - goto err_free_r2_pages; + goto err_hdr_written; } ret = handle_md_page(qcow2, r1.page_id, NULL, &md); if (WARN_ON_ONCE(ret <= 0)) - goto err_free_r2_pages; + goto err_hdr_written; spin_lock_irq(&qcow2->md_pages_lock); set_u64_to_be_page(md->page, r1.index_in_page, i); qcow2_md_make_dirty(qcow2, md, true); @@ -2412,7 +2488,7 @@ static int relocate_refcount_table(struct qcow2 *qcow2, struct qio **qio) for (i = pos; i < r2_end; i += clu_size) { ret = qcow2_handle_r1r2_maps(qcow2, i, NULL, &r1, &r2, false); if (WARN_ON_ONCE(ret <= 0)) - goto err_free_r2_pages; + goto err_hdr_written; mark_cluster_used(qcow2, r2.md, r2.index_in_page); } @@ -2420,12 +2496,16 @@ static int relocate_refcount_table(struct qcow2 *qcow2, struct qio **qio) for (i = old_pos; i < old_end; i += clu_size) { ret = qcow2_handle_r1r2_maps(qcow2, i, NULL, &r1, &r2, false); if (WARN_ON_ONCE(ret <= 0)) - goto err_free_r2_pages; + goto err_hdr_written; mark_cluster_unused(qcow2, r2.md, r2.index_in_page, i); } return 1; +err_hdr_written: + /* Header on disk points to new R1, refcounts may be inconsistent */ + QC_ERR(qcow2->tgt->ti, "failed to relocate refcount table"); + qcow2->tgt->md_writeback_error = true; err_free_r2_pages: for (i = end; i < r2_end; i += clu_size) { ret = handle_md_page(qcow2, i >> PAGE_SHIFT, NULL, &md); diff --git a/drivers/md/dm-qcow2-target.c b/drivers/md/dm-qcow2-target.c index 2d69e39a3530..7895fea531ae 100644 --- a/drivers/md/dm-qcow2-target.c +++ b/drivers/md/dm-qcow2-target.c @@ -170,6 +170,7 @@ static void qcow2_free_md_pages_tree(struct rb_root *root) void qcow2_flush_deferred_activity(struct qcow2_target *tgt, struct qcow2 *qcow2) { struct rb_node *node; + bool wb_error = false; struct md_page *md; int i; @@ -191,13 +192,17 @@ void qcow2_flush_deferred_activity(struct qcow2_target *tgt, struct qcow2 *qcow2 node; node = rb_next(node)) { md = rb_entry(node, struct md_page, node); /* FIXME: call md_make_dirty() and try once again? */ - if (md->status & MD_WRITEBACK_ERROR) { - QC_ERR(tgt->ti, "Failed to write dirty pages"); - tgt->md_writeback_error = true; - break; - } + if (md->status & MD_WRITEBACK_ERROR) + wb_error = true; + if (md->status & MD_LX_REVERTED) + tgt->lx_writeback_error = true; } spin_unlock_irq(&qcow2->md_pages_lock); + + if (wb_error) { + QC_ERR(tgt->ti, "Failed to write dirty pages"); + tgt->md_writeback_error = true; + } } static void qcow2_flush_deferred_activity_all(struct qcow2_target *tgt) @@ -1058,11 +1063,32 @@ static void qcow2_truncate_preallocations(struct dm_target *ti) { struct qcow2_target *tgt = to_qcow2_target(ti); struct qcow2 *qcow2 = top_qcow2_protected(ti); - loff_t end = qcow2->file_preallocated_area_start; + loff_t used_end, end = qcow2->file_preallocated_area_start; int ret; if (!(dm_table_get_mode(ti->table) & FMODE_WRITE)) return; + + /* + * Refcounts don't match L1/L2 on disk after failed md writeback. + * They may also be below real usage in an image opened dirty, + * e.g. after a crash. If userspace sets the dirty bit, it is set + * on every RW open and userspace checks the image before that. + */ + if (tgt->md_writeback_error) { + QC_INFO(ti, "Skip shrinking to used end after md writeback error"); + } else if (tgt->lx_writeback_error) { + QC_INFO(ti, "Skip shrinking to used end after reverted L1/L2 writeback"); + } else if (kernel_sets_dirty_bit && qcow2->opened_dirty) { + QC_INFO(ti, "Skip shrinking to used end of dirty image"); + } else { + used_end = qcow2_calc_used_end(qcow2); + if (used_end < 0) + QC_ERR(ti, "Can't find used end: %pe", ERR_PTR(used_end)); + else + end = used_end; + } + if (end == qcow2->file_size) return; diff --git a/drivers/md/dm-qcow2.h b/drivers/md/dm-qcow2.h index a2d951ee5541..7db2d9301cad 100644 --- a/drivers/md/dm-qcow2.h +++ b/drivers/md/dm-qcow2.h @@ -134,6 +134,7 @@ struct md_page { #define MD_DIRTY (1U << 1) /* Page contains changes and wants writeback */ #define MD_WRITEBACK (1U << 2) /* Writeback was submitted */ #define MD_WRITEBACK_ERROR (1U << 3) /* Last writeback failed with error */ +#define MD_LX_REVERTED (1U << 4) /* L1/L2 on disk may point to freed cluster */ unsigned int status; struct page *page; struct list_head wait_list; @@ -200,6 +201,7 @@ struct qcow2_target { bool service_operations_allowed; bool wants_suspend; bool md_writeback_error; + bool lx_writeback_error; bool truncate_error; bool event_enospc; @@ -413,6 +415,7 @@ void qcow2_ref_dec(struct qcow2_target *tgt, u8 ref_index); int qcow2_inflight_ref_switch(struct qcow2_target *tgt); void qcow2_flush_deferred_activity(struct qcow2_target *tgt, struct qcow2 *qcow2); int qcow2_truncate_safe(struct file *file, loff_t new_len); +loff_t qcow2_calc_used_end(struct qcow2 *qcow2); void qcow2_merge_backward_work(struct work_struct *work); void qcow2_merge_backward_cancel(struct qcow2_target *tgt); @@ -461,7 +464,8 @@ static inline bool fake_service_qio(struct qio *qio) static inline bool qcow2_wants_check(struct qcow2_target *tgt) { - return !!(tgt->md_writeback_error|tgt->truncate_error); + return !!(tgt->md_writeback_error|tgt->lx_writeback_error| + tgt->truncate_error); } static inline bool qcow2_file_is_writable(struct qcow2 *qcow2) -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel