Received: from eggs.gnu.org ([2001:4830:134:3::10]:37147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5RhF-0000NR-Ls for qemu-devel@nongnu.org; Wed, 25 May 2016 01:49:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5Rh9-0005un-Md for qemu-devel@nongnu.org; Wed, 25 May 2016 01:49:32 -0400 Received: from prv-mh.provo.novell.com ([137.65.248.74]:46924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5Rh9-0005uj-AY for qemu-devel@nongnu.org; Wed, 25 May 2016 01:49:27 -0400 Message-Id: <5745AD5F020000620006EADE@prv-mh.provo.novell.com> Date: Tue, 24 May 2016 23:49:19 -0600 From: "Lin Ma" References: <5741F282020000620006D415@prv-mh.provo.novell.com> <20160523090012.GA4951@noname.redhat.com> In-Reply-To: <20160523090012.GA4951@noname.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] =?utf-8?b?562U5aSN77yaIFJlOiAgUkZDOiBNYWtlICdpbmZv?= =?utf-8?q?_snapshots=27_show_all_of_snapshots_with_multiple_devices_info?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, mreitz@redhat.com >>> Kevin Wolf 2016/5/23 =E6=98=9F=E6=9C=9F=E4=B8=80 = =E4=B8=8B=E5=8D=88 5:00 >>> >Am 22.05.2016 um 11:55 hat Lin Ma geschrieben: >> Currently, the output of =27info snapshots=27 show fully available = snapshots. >> =20 >> In my opinion there are 2 disadvantages: >> 1. It=27s opaque, hides some snapshot information to users. It=27s not = convenient >> if users want to know more about all of snapshots on every block device = via >> monitor. >> =20 >> 2. It uses snapshot id to determine whether the snapshots are =27fully >> available=27. >> It causes incorrect output in some scenario. >> =20 >> For instance: >> (qemu) info block >> drive_image1 (=23block113): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk0.qco= w2 >> (qcow2) >> Cache mode: writeback >> =20 >> drive_image2 (=23block349): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk1.qco= w2 >> (qcow2) >> Cache mode: writeback >> (qemu) >> (qemu) info snapshots >> There is no snapshot available. >> (qemu) >> (qemu) snapshot_blkdev_internal drive_image1 snap1 >> (qemu) >> (qemu) info snapshots >> There is no suitable snapshot available >> (qemu) >> (qemu) savevm checkpoint-1 >> (qemu) >> (qemu) info snapshots >> ID TAG VM SIZE = DATE VM CLOCK >> 1 snap1 0 2016-05-22 = 16:57:31 00:01:30.567 >> (qemu) >>=20 >> =24 qemu-img snapshot -l disk0.qcow2 >> Snapshot list: >> ID TAG VM SIZE = DATE VM CLOCK >> 1 snap1 0 2016-05-22 = 16:57:31 00:01:30.567 >> 2 checkpoint-1 165M 2016-05-22 16:58:07 = 00:02:06.813 >>=20 >> =24 qemu-img snapshot -l disk1.qcow2 >> Snapshot list: >> ID TAG VM SIZE = DATE VM CLOCK >> 1 checkpoint-1 0 2016-05-22 16:58:07 = 00:02:06.813 >> =20 >> =20 >> =20 >> I=27d like to patch it to make the output looking like this: >> (qemu) info snapshots >> =20 >> Snapshot list from drive_image1: >> ID TAG VM SIZE = DATE VM CLOCK >> 1 snap1 0 2016-05-22 = 16:57:31 00:01:30.567 >> 2 checkpoint-1 165M 2016-05-22 16:58:07 = 00:02:06.813 >> =20 >>=20 >> Snapshot list from drive_image2: >> ID TAG VM SIZE = DATE VM CLOCK >> 1 checkpoint-1 0 2016-05-22 16:58:07 = 00:02:06.813 > >I think that would clutter the output too much in the common case where >all images have the same snapshots. How about having a list with all >loadable snapshots first, and then only an additional list for images >that have snapshots that aren=27t present on all images? > >(qemu) info snapshots >List of snapshots present on all disks: >ID TAG VM SIZE = DATE VM CLOCK >-- checkpoint-1 165M 2016-05-22 16:58:07 = 00:02:06.813 Double short dash, good idea. >List of partial (non-loadable) snapshots on =27drive_image1=27: >ID TAG VM SIZE = DATE VM CLOCK >1 snap1 0 2016-05-22 = 16:57:31 00:01:30.567 These looks more convenient. I=27ll do it follow this format, Thanks. =20 =20 Lin