Received: from eggs.gnu.org ([2001:4830:134:3::10]:38367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2z4e-0002s1-Mb for qemu-devel@nongnu.org; Fri, 04 Jul 2014 04:42:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2z4V-00069d-Kv for qemu-devel@nongnu.org; Fri, 04 Jul 2014 04:42:28 -0400 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]:34326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2z4V-00069X-EU for qemu-devel@nongnu.org; Fri, 04 Jul 2014 04:42:19 -0400 Received: by mail-we0-f169.google.com with SMTP id t60so1341912wes.14 for ; Fri, 04 Jul 2014 01:42:18 -0700 (PDT) Date: Fri, 4 Jul 2014 10:42:15 +0200 From: Stefan Hajnoczi Message-ID: <20140704084215.GC32739@stefanha-thinkpad.redhat.com> References: <1404443202-14174-1-git-send-email-ming.lei@canonical.com> <1404443202-14174-3-git-send-email-ming.lei@canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7gGkHNMELEOhSGF6" Content-Disposition: inline In-Reply-To: <1404443202-14174-3-git-send-email-ming.lei@canonical.com> Subject: Re: [Qemu-devel] [PATCH v5 2/3] linux-aio: implement io plug, unplug and flush io queue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lei Cc: Kevin Wolf , Peter Maydell , Fam Zheng , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Stefan Hajnoczi , Paolo Bonzini --7gGkHNMELEOhSGF6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jul 04, 2014 at 11:06:41AM +0800, Ming Lei wrote: > +static int ioq_submit(struct qemu_laio_state *s) > +{ > + int ret, i = 0; > + int len = s->io_q.idx; > + > + do { > + ret = io_submit(s->ctx, len, s->io_q.iocbs); > + } while (i++ < 3 && ret == -EAGAIN); > + > + /* empty io queue */ > + s->io_q.idx = 0; > + > + if (ret >= 0) { > + return 0; > + } > + > + for (i = 0; i < len; i++) { > + struct qemu_laiocb *laiocb = > + container_of(s->io_q.iocbs[i], struct qemu_laiocb, iocb); > + > + laiocb->ret = ret; > + qemu_laio_process_completion(s, laiocb); > + } > + return ret; > +} Please see my review of the previous revision. You didn't address my comments. Stefan --7gGkHNMELEOhSGF6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTtmjnAAoJEJykq7OBq3PIbzoH/3aPpqQq1wZXTGMkuRjh4VrD Yf+xbh6PrXtrKLmT5tw+Ai9vB8cUkzWDz/lbQkVRnJN8CD8EGQdMzryGndbwIyQL i+fmbq1y0kCVOi+yox5mWRpQ+Fr1vwg4+SXFnSKN0iexE7Cn1gPn2qwlbC9Poxnl qG9GZlSv4XbfiPbUiXmN4ncrwun2kB7UP7RSc/upCE+rcijvqc+g8CJVGgd2kOz9 dOtAXynWVS88z0ydF571sNudio9sJGqMPHlinMGbQB7TQio6TDBVfLDjn94MSo4I jNIiOcMh1CHU4K8AFR8G4CZUxtKsGntaz8hdfHzHj4QFtTIjqC7iHsJD+sLM1Kg= =FzNF -----END PGP SIGNATURE----- --7gGkHNMELEOhSGF6--