qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Kevin Wolf <kwolf@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Michael Roth <mdroth@linux.vnet.ibm.com>,
	Eric Blake <eblake@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v1 0/6] Report format specific info for LUKS block driver
Date: Tue, 14 Jun 2016 15:05:59 +0100	[thread overview]
Message-ID: <20160614140559.GS4310@redhat.com> (raw)
In-Reply-To: <0ba49fee-41ac-82c4-2031-2622ca6c1bec@redhat.com>

On Tue, Jun 14, 2016 at 03:56:30PM +0200, Max Reitz wrote:
> On 07.06.2016 12:11, Daniel P. Berrange wrote:
> > The 'qemu-img info' tool has ability to print format specific
> > information, eg with qcow2 it reports two extra items:
> > 
> >   $ qemu-img info ~/VirtualMachines/demo.qcow2
> >   image: /home/berrange/VirtualMachines/demo.qcow2
> >   file format: qcow2
> >   virtual size: 3.0G (3221225472 bytes)
> >   disk size: 140K
> >   cluster_size: 65536
> >   Format specific information:
> >       compat: 0.10
> >       refcount bits: 16
> > 
> > 
> > This is not currently wired up for the LUKS driver. This patch
> > series adds that support so that we can report useful data about
> > the LUKS volume such as the crypto algorithm choices, key slot
> > usage and other volume metadata.
> > 
> > The first patch extends the crypto API to allow querying of the
> > format specific metadata
> > 
> > The second patches extends the block API to allow the LUKS driver
> > to report the format specific metadata.
> > 
> >     $ qemu-img info ~/VirtualMachines/demo.luks
> >     image: /home/berrange/VirtualMachines/demo.luks
> >     file format: luks
> >     virtual size: 98M (102760448 bytes)
> >     disk size: 100M
> >     encrypted: yes
> >     Format specific information:
> >         cipher-alg: aes-128
> >         cipher-mode: xts
> >         ivgen-alg: plain64
> >         hash-alg: sha1
> >         payload-offset: 2097152
> >         master-key-iters: 142375
> >         uuid: 6ddee74b-3a22-408c-8909-6789d4fa2594
> >         slots:
> >             [0]:
> >                 active: true
> >                 iters: 572706
> >                 stripes: 4000
> >                 key-offset: 8
> >             [1]:
> >                 active: false
> >                 iters: 0
> >                 stripes: 4000
> >                 key-offset: 264
> >             [2]:
> >                 active: false
> >                 iters: 0
> >                 stripes: 4000
> >                 key-offset: 520
> >             [3]:
> >                 active: false
> >                 iters: 0
> >                 stripes: 4000
> >                 key-offset: 776
> >             [4]:
> >                 active: false
> >                 iters: 0
> >                 stripes: 4000
> >                 key-offset: 1032
> >             [5]:
> >                 active: false
> >                 iters: 0
> >                 stripes: 4000
> >                 key-offset: 1288
> >             [6]:
> >                 active: false
> >                 iters: 0
> >                 stripes: 4000
> >                 key-offset: 1544
> >             [7]:
> >                 active: false
> >                 iters: 0
> >                 stripes: 4000
> >                 key-offset: 1800
> > 
> > The remaining 4 patches are improvements to QAPI and the core
> > block layer to fix a problem whereby struct fields are output
> > in (apparently) random ordering. This is because the QAPI type
> > is converted into a QObject for pretty-printing, thus throwing
> > away any struct field ordering information.
> > 
> > To address this I created a new TextOutputVisitor which can
> > directly pretty-print QAPI types. I then changed the code
> > generator to create qapi_stringify_TYPENAME() methods for
> > all QAPI types. Finally I changed the block layer over to
> > use this stringify approach instead.
> 
> General nagging: This new approach no longer replaces dashes with spaces
> in the key names. Is it worth doing something about this?

Opps, didn't notice that. Should be pretty easy to deal with that
in the visitor.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

      reply	other threads:[~2016-06-14 14:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07 10:11 [Qemu-devel] [PATCH v1 0/6] Report format specific info for LUKS block driver Daniel P. Berrange
2016-06-07 10:11 ` [Qemu-devel] [PATCH v1 1/6] crypto: add support for querying parameters for block encryption Daniel P. Berrange
2016-06-07 14:17   ` Eric Blake
2016-06-07 10:11 ` [Qemu-devel] [PATCH v1 2/6] block: export LUKS specific data to qemu-img info Daniel P. Berrange
2016-06-07 15:36   ` Eric Blake
2016-06-07 15:51     ` Daniel P. Berrange
2016-06-07 16:11       ` Eric Blake
2016-06-07 10:11 ` [Qemu-devel] [PATCH v1 3/6] qapi: assert that visitor impls have required callbacks Daniel P. Berrange
2016-06-07 15:40   ` Eric Blake
2016-06-07 15:46     ` Daniel P. Berrange
2016-06-07 10:11 ` [Qemu-devel] [PATCH v1 4/6] qapi: add a text output visitor for pretty printing types Daniel P. Berrange
2016-06-07 16:09   ` Eric Blake
2016-06-07 16:20     ` Daniel P. Berrange
2016-06-07 16:40       ` Eric Blake
2016-06-07 16:45         ` Daniel P. Berrange
2016-06-07 10:11 ` [Qemu-devel] [PATCH v1 5/6] qapi: generate a qapi_stringify_TYPENAME method for all types Daniel P. Berrange
2016-06-07 16:23   ` Eric Blake
2016-06-07 10:11 ` [Qemu-devel] [PATCH v1 6/6] block: convert to use qapi_stringify_ImageInfoSpecific Daniel P. Berrange
2016-06-07 16:59   ` Eric Blake
2016-06-07 12:04 ` [Qemu-devel] [PATCH v1 0/6] Report format specific info for LUKS block driver Eric Blake
2016-06-07 14:35   ` Daniel P. Berrange
2016-06-14 13:56 ` Max Reitz
2016-06-14 14:05   ` Daniel P. Berrange [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160614140559.GS4310@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).