qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Benoît Canet" <benoit.canet@irqsave.net>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Merging the quorum block driver
Date: Wed, 18 Sep 2013 17:05:27 +0200	[thread overview]
Message-ID: <20130918150527.GA5025@irqsave.net> (raw)
In-Reply-To: <20130917124413.GA822@stefanha-thinkpad.str.redhat.com>

Le Tuesday 17 Sep 2013 à 14:44:13 (+0200), Stefan Hajnoczi a écrit :
> Hi Benoit,
> Kevin and I had a chance to chat face-to-face and we discussed what
> concrete changes are necessary to merge quorum (without solving all the
> other block layers problems at once).
> 
> I think quorum could be merged relatively quickly (and without massive
> BlockFilter investments) by changing the following:
> 
> 1. Defining children on the command-line
> 
> Existing "filter" drivers use the protocol filename to embed their
> children, for example the blkverify driver.  This is a big hack because
> we have no proper syntax or escaping for the embedded drive definitions
> in the file= option.
> 
> This was one of the main arguments against merging quorum.  Now that
> Kevin has implemented driver-specific open options (see
> block/qcow2.c:qcow2_runtime_opts), it is possible for the quorum driver
> to open children specific on the command-line:
> 
>   -drive if=none,file.driver=quorum,format=raw,\
>          file.children0.file=/nfs1/test.qcow2,\
>          file.children1.file=/nfs2/test.qcow2,\
>          file.children2.file=/nfs3/test.qcow2

Hello Stefan,

I started writing the code.

How would the quorum treshold be specified with this command line style ?

Best regards

Benoît

> 
> Here is pseudo-code for quorum_open().  It extracts the children from
> the command-line and opens BlockDriverStates for them:
> 
> def quorum_open(qdict):
>     for key in qdict:
>         # Parse out child index
>         match = key.match('^children(\d+)\.')
>         if not match:
>             continue
>         idx = match.group(0)
> 
>         # block.c:extract_subqdict() already lets you extract a new
>         # qdict with the fields starting with a prefix.  You could make
>         # this function common.
>         child_dict = extract_subqdict(qdict, 'children%d.' % idx)
> 
>         # Finally open the child with its specific options
>         children[idx] = bdrv_open(child_dict)
> 
> After doing this we no longer need to embed the children into the file=
> option as a string and driver-specific options can be used for the
> children.
> 
> 2. Prevent external snapshots
> 
> The user may wish to snapshot above or below the quorum BDS.  There is
> no syntax to express the BDS tree node where snapshotting should happen.
> Implementing this fully is a distraction and requires additional work.
> 
> For quorum it is simplest to add a BDS interface so block drivers can
> forbid snapshots.  This is called recursively on the whole BDS tree, so
> quorum can veto the snapshot operation.  An error is returned saying the
> device does not support snapshots.
> 
> In the future this limitation can be lifted but for the near-term this
> is a simple step to make quorum mergable.
> 
> With these changes quorum should be mergable.  Implementing full
> BlockFilter support is not necessary yet but we can discuss it in
> separate thread, if you want.
> 
> Stefan

  parent reply	other threads:[~2013-09-18 15:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 12:44 [Qemu-devel] Merging the quorum block driver Stefan Hajnoczi
2013-09-17 16:13 ` Benoît Canet
2013-09-18 15:05 ` Benoît Canet [this message]
2013-09-19  8:26   ` Stefan Hajnoczi
2013-09-19  8:57     ` Kevin Wolf
2013-09-19 12:55       ` Benoît Canet
2013-09-19 13:21         ` Kevin Wolf
2013-09-19 13:38           ` Benoît Canet
2013-09-19 14:23             ` Kevin Wolf
2013-09-20 12:08               ` Benoît Canet
2013-09-20 14:26                 ` Kevin Wolf
2013-09-19 14:51           ` Eric Blake
2013-09-19 15:05             ` Daniel P. Berrange

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=20130918150527.GA5025@irqsave.net \
    --to=benoit.canet@irqsave.net \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).