qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] blobstore disk format (was Re: Design of the blobstore)
Date: Thu, 15 Sep 2011 15:28:43 +0300	[thread overview]
Message-ID: <20110915122842.GA6302@redhat.com> (raw)

So the below is a proposal for a directory scheme
for storing (optionally multiple) nvram images,
along with any metadata.
Data is encoded using BER:
http://en.wikipedia.org/wiki/Basic_Encoding_Rules
Specifically, we mostly use the subsets.

We use a directory as a SET in a CER format.
This allows generating directory online without scanning
the entries beforehand.

The rest of the encoding uses a DER format.
This makes for fast parsing as entries are easy to skip.

Each entry is encoded in DER format.
Each entry is a SEQUENCE with two objects:
1. nvram
2. optional name - a UTF8String

Binary data is stored as OCTET-STRING values on disk.
Any RW metadata is stored as OCTET-STRING value as well.
Any RO metadata is stored in appropriate universal encoding,
by type.

On the context below, an attribute is either a IA5String or a SEQUENCE.
If IA5String, this is the attribute name, and it has no value.
If SEQUENCE, the first entry in the sequence is an
IA5String, it is the attribute name. The rest of the entries
represent the attribute value.

Mandatory/optional attributes: depends on type.
tpm will have realsize as RW mandatory attribute.

Each nvram is built as a SEQUENCE including 4 objects
1. type - an IA5String. downstreams can use other types such as
                     UUIDs instead to ensure no conflicts with upstream
2. SET of mandatory attributes
3. SET of optional attributes
4. data - a RW OCTET-STRING

It is envisioned that attributes won't be too large,
so they can easily be kept in memory.


-- 
MST

             reply	other threads:[~2011-09-15 12:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15 12:28 Michael S. Tsirkin [this message]
2011-09-15 14:33 ` [Qemu-devel] blobstore disk format (was Re: Design of the blobstore) Stefan Berger
2011-09-16 14:44   ` Michael S. Tsirkin
2011-09-16 16:46     ` Stefan Berger
2011-09-17 19:28       ` Michael S. Tsirkin
2011-09-19 16:22         ` Stefan Berger
2011-09-19 19:04           ` Michael S. Tsirkin
2011-09-22  1:44             ` Stefan Berger
2011-09-22  6:37               ` Michael S. Tsirkin
2011-09-28 15:48                 ` Stefan Berger
2011-09-28 15:50                   ` Daniel P. Berrange
2011-09-28 19:19                     ` Stefan Berger
2011-10-02  9:18                   ` Michael S. Tsirkin

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=20110915122842.GA6302@redhat.com \
    --to=mst@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    /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).