From nobody Mon May 6 11:53:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1542182212744236.0710237939985; Tue, 13 Nov 2018 23:56:52 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F833312E9E8; Wed, 14 Nov 2018 07:56:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D9D4A60BF6; Wed, 14 Nov 2018 07:56:47 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 89B364CAA8; Wed, 14 Nov 2018 07:56:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAE7JRRH007983 for ; Wed, 14 Nov 2018 02:19:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id 95E015D756; Wed, 14 Nov 2018 07:19:27 +0000 (UTC) Received: from hansolo.nay.redhat.com (unknown [10.66.4.128]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A52A5D6A6; Wed, 14 Nov 2018 07:19:23 +0000 (UTC) From: Han Han To: libvir-list@redhat.com Date: Wed, 14 Nov 2018 15:19:20 +0800 Message-Id: <20181114071920.21971-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Han Han Subject: [libvirt] [PATCH] docs: Add notes for VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 14 Nov 2018 07:56:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" When listing snapshot with VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA, it always returns 0 or no snapshot. Because we never implement funtions to list no-metadata snapshot in virDomainSnapshotObjListGetNames(): if ((data.flags & VIR_DOMAIN_SNAPSHOT_FILTERS_METADATA) =3D=3D VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA) return 0; Add notes for that flag. Please update the comment and man page of that flag when no-metadata snapshot list is implemented in the future. Signed-off-by: Han Han --- include/libvirt/libvirt-domain-snapshot.h | 5 ++++- tools/virsh.pod | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/libvirt/libvirt-domain-snapshot.h b/include/libvirt/li= bvirt-domain-snapshot.h index 20771f9b1e..2e19a52a5c 100644 --- a/include/libvirt/libvirt-domain-snapshot.h +++ b/include/libvirt/libvirt-domain-snapshot.h @@ -93,7 +93,10 @@ char *virDomainSnapshotGetXMLDesc(virDomainSnapshotPtr s= napshot, * of flag (1<<0) depends on which function it is passed to; but serves * to toggle the per-call default of whether the listing is shallow or * recursive. Remaining bits come in groups; if all bits from a group are - * 0, then that group is not used to filter results. */ + * 0, then that group is not used to filter results. Internal functions + * for listing no-metadata snapshots aren't implemented. Functions above + * will return 0 when VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA is used. + * */ typedef enum { VIR_DOMAIN_SNAPSHOT_LIST_ROOTS =3D (1 << 0), /* Filter by snapsh= ots with no parents, w= hen diff --git a/tools/virsh.pod b/tools/virsh.pod index 86c041d575..b3d3840c2b 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -4689,6 +4689,9 @@ B of a persistent domain, or be lost on B of a transient domain. Likewise, if I<--no-metadata> is specified, the list will be filtered to just snapshots that exist without the need for libvirt metadata. +Note that - It will return no snapshot when I<--no-metadata> is +used since internal functions for listing no-metadata snapshot +are not implemented. =20 If I<--inactive> is specified, the list will be filtered to snapshots that were taken when the domain was shut off. If I<--active> is --=20 2.19.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list