<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello,</div><div>I found snapshot APIs(like virDomainSnapshotNum) invoked with VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA will return 0 even there are internal no-metadata snapshots in the domain.</div><div><br></div><div>Then I find the reason is in virDomainSnapshotObjListGetNames():<br><div>   937     /* If this common code is being used, we assume that all snapshots          <br>   938     ┆* have metadata, and thus can handle METADATA up front as an               <br>   939     ┆* all-or-none filter.  XXX This might not always be true, if we            <br>   940     ┆* add the ability to track qcow2 internal snapshots without the            <br>   941     ┆* use of metadata.  */                                                     <br>   942     if ((data.flags & VIR_DOMAIN_SNAPSHOT_FILTERS_METADATA) ==                  <br>   943     ┆   VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA)                                   <br>   944     ┆   return 0;    </div><div><br></div>So currently, with VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA, no snapshot will be returned.</div><div><br></div><div>I checked the commit. It is really old(6478ec1673a    Eric Blake     2012-08-13 18:09:12 -0600) . I guess it was initially designed for the function to list internal snapshots without metadata. <br></div><div><br></div><div>However, now internal snapshot seems lower prioritized than external snapshot. <br></div><div>Do we have plan to design this function? Since the APIs invoked with this flag don't return the **right** result, if the function for VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA will not be designed, how will we deal with the flag? Remove it from code OR update the docs to mark it unsupported?<br></div><div><br></div><div><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Best regards,</div><div dir="ltr">-----------------------------------<br></div><div dir="ltr">Han Han<br>Quality Engineer<br>Redhat.<br><br>Email: <a href="mailto:hhan@redhat.com" target="_blank">hhan@redhat.com</a><br>Phone: +861065339333<br></div></div></div></div></div></div></div></div></div></div></div>