From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4lim-0006ue-3v for qemu-devel@nongnu.org; Mon, 23 May 2016 05:00:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4lih-0001mr-Rl for qemu-devel@nongnu.org; Mon, 23 May 2016 05:00:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4lih-0001mn-JJ for qemu-devel@nongnu.org; Mon, 23 May 2016 05:00:15 -0400 Date: Mon, 23 May 2016 11:00:12 +0200 From: Kevin Wolf Message-ID: <20160523090012.GA4951@noname.redhat.com> References: <5741F282020000620006D415@prv-mh.provo.novell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5741F282020000620006D415@prv-mh.provo.novell.com> Subject: Re: [Qemu-devel] RFC: Make 'info snapshots' show all of snapshots with multiple devices info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lin Ma Cc: qemu-devel@nongnu.org, mreitz@redhat.com Am 22.05.2016 um 11:55 hat Lin Ma geschrieben: > Currently, the output of 'info snapshots' show fully available snapshots. > > In my opinion there are 2 disadvantages: > 1. It's opaque, hides some snapshot information to users. It's not convenient > if users want to know more about all of snapshots on every block device via > monitor. > > 2. It uses snapshot id to determine whether the snapshots are 'fully > available'. > It causes incorrect output in some scenario. > > For instance: > (qemu) info block > drive_image1 (#block113): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk0.qcow2 > (qcow2) > Cache mode: writeback > > drive_image2 (#block349): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk1.qcow2 > (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) > > $ 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 > > $ 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 > > > > I'd like to patch it to make the output looking like this: > (qemu) info snapshots > > 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 > > > 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't 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 List of partial (non-loadable) snapshots on 'drive_image1': ID TAG VM SIZE DATE VM CLOCK 1 snap1 0 2016-05-22 16:57:31 00:01:30.567 Kevin