From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyzfE-0002w5-TO for qemu-devel@nongnu.org; Mon, 23 Jun 2014 04:31:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wyzf9-0007Tq-7o for qemu-devel@nongnu.org; Mon, 23 Jun 2014 04:31:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wyzf8-0007Ti-UG for qemu-devel@nongnu.org; Mon, 23 Jun 2014 04:31:39 -0400 Date: Mon, 23 Jun 2014 16:31:24 +0800 From: Stefan Hajnoczi Message-ID: <20140623083124.GB9640@stefanha-thinkpad.redhat.com> References: <1403189328-18457-1-git-send-email-cnanakos@grnet.gr> <1403189328-18457-2-git-send-email-cnanakos@grnet.gr> <20140620143346.GG11029@stefanha-thinkpad.redhat.com> <53A7E28C.9060107@grnet.gr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KFztAG8eRSV9hGtP" Content-Disposition: inline In-Reply-To: <53A7E28C.9060107@grnet.gr> Subject: Re: [Qemu-devel] [PATCH v4 1/3] block: Support Archipelago as a QEMU block backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chrysostomos Nanakos Cc: kwolf@redhat.com, Stefan Hajnoczi , qemu-devel@nongnu.org --KFztAG8eRSV9hGtP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =3D 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. >=20 > 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 succeed= ed > 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. >=20 > 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=3Dqemu.git;a=3Dcommitdiff;h=3D170632dbc9f75217861dd8= bf2e6da3c269a1ba18 Please do something similar so you can run the test suite like this: cd tests/qemu-iotests ./check -archipelago Stefan --KFztAG8eRSV9hGtP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTp+XcAAoJEJykq7OBq3PIoYcIAJvICxmtT7JRb6tj0apHRP9d JLqKO8kHye+MV06Ln6obNT1NePJVspnyD5CEAmtLJ/mrrTBKlHmNH1/kWDNFWOvg 5HiJFrQAdml96hR4eTrEh8/YtOtaO/uOmTkhewrSjELj2BdheHAfaaY3DIprbh7s tqqJldolD8sovPbK45qwK/ScEOEEle5SP1hmk90sXuDAUb3eHW5FLIqvFPJnvHhe Nrx7aeo8Ru+l3nxcH5covVgQMC2A8QfHMofRlUKcFW+5KqDZaqkXL83gHIyz3WRS DLp2znQ9B6Jv9MZgJOHqcHrpuUQ22wGQ+zFjiajanbve03aMDvNvU6L3k7Fj2jk= =Vmmc -----END PGP SIGNATURE----- --KFztAG8eRSV9hGtP--