qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Benoît Canet" <benoit.canet@irqsave.net>
To: Andy Grover <agrover@redhat.com>
Cc: "Benoît Canet" <benoit.canet@irqsave.net>,
	kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com,
	pbonzini@redhat.com
Subject: Re: [Qemu-devel] tcmu-runner and QEMU
Date: Fri, 29 Aug 2014 20:51:21 +0200	[thread overview]
Message-ID: <20140829185121.GA31376@irqsave.net> (raw)
In-Reply-To: <5400C896.2040600@redhat.com>

The Friday 29 Aug 2014 à 11:38:14 (-0700), Andy Grover wrote :
> On 08/29/2014 10:22 AM, Benoît Canet wrote:
> >The truth is that QEMU block drivers don't know how to do much on their own
> >so we probably must bring the whole QEMU  block layer in a tcmu-runner handler plugin.
> 
> Woah! Really? ok...
> 
> >Another reason to do this is that the QEMU block layer brings features like taking
> >snapshots or streaming snaphots that a cloud provider would want to keep while exporting
> >QCOW2 as ISCSI or FCOE.
> >
> >Doing these operations is usually done by passing something like
> >"--qmp tcp:localhost,4444,server,nowait" as a QEMU command line argument then
> >connecting on this JSON processing socket then send orders to QEMU.
> 
> The LIO TCMU backend and tcmu-runner provide for a configstring that is
> associated with a given backstore. This is made available to the handler,
> and sounds like just what qmp needs.
> 
> >I made some patches to split this QMP machinery from the QEMU binary but still
> >I don't know how a tcmu-runner plugin handler would be able to receive this command
> >line configuration.
> 
> The flow would be:
> 1) admin configures a LIO backstore of type "user", size 10G, and gives it a
> configstring like "qmp/tcp:localhost,4444,server,nowait"
> 2) admin exports the backstore via whatever LIO-supported fabric(s) (e.g.
> iSCSI)
> 3) tcmu-runner is notified of the new user backstore from step 1, finds the
> handler associated with "qmp", calls
> handler->open("tcp:localhost,4444,server,nowait")
> 4) qmp handler parses string and does whatever it needs to do
> 5) handler receives SCSI commands as they arrive

QMP is just a way to control QEMU via a socket: it is not particularly block related.

On the other hand bringing the whole block layers into a tcmu-runner handler
would mean that there would be _one_ QMP socket opened
(by mean of wonderfull QEMU modules static variables :) to control multiple block devices
exported.

So I think the configuration passed must be done before an individual open occurs:
being global to the .so implementing the tcmu-runner handler.

But I don't see how to do it with the current API.

Best regards

Benoît

> 
> >The second problem is that the QEMU block layer is big and filled with scary stuff like
> >threads and coroutines but I think only trying to write the tcmu-runner handler will
> >tell if it's doable.
> 
> Yeah, could be tricky but would be pretty cool if it works. Let me know how
> I can help, or with any questions.
> 
> Regards -- Andy
> 

  reply	other threads:[~2014-08-29 18:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29 17:22 [Qemu-devel] tcmu-runner and QEMU Benoît Canet
2014-08-29 18:38 ` Andy Grover
2014-08-29 18:51   ` Benoît Canet [this message]
2014-08-29 22:36     ` Andy Grover
2014-08-29 22:46       ` Benoît Canet
2014-08-30 14:46 ` Richard W.M. Jones
2014-08-30 15:53   ` Benoît Canet
2014-08-30 16:02     ` Richard W.M. Jones
2014-08-30 16:04       ` Richard W.M. Jones
2014-08-30 17:22         ` Benoît Canet
2014-08-30 21:50           ` Benoît Canet
2014-08-30 16:51       ` Benoît Canet
2014-08-31 20:03       ` Andy Grover
2014-08-31 20:38         ` Benoît Canet
2014-09-01  8:32           ` Paolo Bonzini
2014-09-01  8:08         ` Paolo Bonzini
2014-09-02  9:25 ` Stefan Hajnoczi
2014-09-03  0:20   ` Andy Grover
2014-09-03  7:34     ` Paolo Bonzini
2014-09-03 13:11     ` Stefan Hajnoczi
2014-09-04 13:24       ` Benoît Canet
2014-09-04 15:15         ` Andy Grover
2014-09-04 15:59           ` Benoît Canet
2014-09-04 20:16           ` Stefan Hajnoczi

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=20140829185121.GA31376@irqsave.net \
    --to=benoit.canet@irqsave.net \
    --cc=agrover@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@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).