qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Chrysostomos Nanakos <cnanakos@grnet.gr>
Cc: kwolf@redhat.com, Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 1/3] block: Support Archipelago as a QEMU block backend
Date: Mon, 23 Jun 2014 16:31:24 +0800	[thread overview]
Message-ID: <20140623083124.GB9640@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <53A7E28C.9060107@grnet.gr>

[-- Attachment #1: Type: text/plain, Size: 1864 bytes --]

On Mon, Jun 23, 2014 at 11:17:16AM +0300, Chrysostomos Nanakos wrote:
> On 06/20/2014 05:33 PM, Stefan Hajnoczi wrote:
> >On Thu, Jun 19, 2014 at 05:48:46PM +0300, Chrysostomos Nanakos wrote:
> >
> >>+                        if (!segreq->failed) {
> >>+                            reqdata->aio_cb->ret = segreq->count;
> >>+                            archipelago_finish_aiocb(reqdata);
> >>+                        }
> >What does segreq->failed mean?  We should always finish the I/O request,
> >otherwise the upper layers will run out of resources as we leak
> >failed requests.
> 
> Yes you are right.
> If a request fails while submitting it to Archipelago
> archipelago_aio_segmented_rw()
> will return -EIO to qemu_archipelago_aio_rw() which will return NULL to
> .bdrv_aio_readv/_write(). Now if all requests to Archipelago have succeeded
> in submission and one or all of them haven't been serviced (partial
> read/write) from Archipelago, archipelago_finish_aiocb() will fail the
> request. The last one wasn't implemented in this patch, v5 series has the
> appropriate changes.
> 
> Is this a proper and accepted approach along with the removal of the pipe
> code and the introduction of the QEMU "bottom-half" scheduled in
> archipelago_finish_aiocb()?

Sounds good.

Please also take a look at
http://wiki.qemu.org/Documentation/QemuIoTests

This is the test suite we use for QEMU block drivers.  It includes many
basic I/O tests and also some specialized tests for advanced features
like snapshotting.

For an example of how to add support, take a look at the commit which
added NFS support:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=170632dbc9f75217861dd8bf2e6da3c269a1ba18

Please do something similar so you can run the test suite like this:

  cd tests/qemu-iotests
  ./check -archipelago

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-06-23  8:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 14:48 [Qemu-devel] [PATCH v4 0/3] Support Archipelago as a QEMU block backend Chrysostomos Nanakos
2014-06-19 14:48 ` [Qemu-devel] [PATCH v4 1/3] block: " Chrysostomos Nanakos
2014-06-20 14:33   ` Stefan Hajnoczi
2014-06-23  8:17     ` Chrysostomos Nanakos
2014-06-23  8:31       ` Stefan Hajnoczi [this message]
2014-06-19 14:48 ` [Qemu-devel] [PATCH v4 2/3] block/archipelago: Add support for creating images Chrysostomos Nanakos
2014-06-20 14:35   ` Stefan Hajnoczi
2014-06-19 14:48 ` [Qemu-devel] [PATCH v4 3/3] QMP: Add support for Archipelago Chrysostomos Nanakos

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=20140623083124.GB9640@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=cnanakos@grnet.gr \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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).