Received: from eggs.gnu.org ([140.186.70.92]:47494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3qZR-0002So-Ey for qemu-devel@nongnu.org; Wed, 14 Sep 2011 10:36:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3qZN-0002Xn-9b for qemu-devel@nongnu.org; Wed, 14 Sep 2011 10:36:13 -0400 Received: from verein.lst.de ([213.95.11.211]:33824 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3qZM-0002Xf-UB for qemu-devel@nongnu.org; Wed, 14 Sep 2011 10:36:09 -0400 Date: Wed, 14 Sep 2011 16:36:08 +0200 From: Christoph Hellwig Message-ID: <20110914143608.GB12218@lst.de> References: <1315628610-28222-1-git-send-email-ronniesahlberg@gmail.com> <1315628610-28222-2-git-send-email-ronniesahlberg@gmail.com> <20110912091408.GA3465@stefanha-thinkpad.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110912091408.GA3465@stefanha-thinkpad.localdomain> Subject: Re: [Qemu-devel] [PATCH] This patch adds a new block driver : iSCSI List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kwolf@redhat.com, fujita.tomonori@lab.ntt.co.jp, qemu-devel@nongnu.org, Ronnie Sahlberg , hch@lst.de On Mon, Sep 12, 2011 at 10:14:08AM +0100, Stefan Hajnoczi wrote: > > +static void > > +iscsi_aio_cancel(BlockDriverAIOCB *blockacb) > > +{ > > + IscsiAIOCB *acb = (IscsiAIOCB *)blockacb; > > + IscsiLun *iscsilun = acb->iscsilun; > > + > > + acb->status = -ECANCELED; > > + acb->common.cb(acb->common.opaque, acb->status); > > + acb->canceled = 1; > > + > > + iscsi_task_mgmt_abort_task_async(iscsilun->iscsi, acb->task, > > + iscsi_abort_task_cb, NULL); > > +} > > The asynchronous abort task call looks odd. If a caller allocates a > buffer and issues a read request, then we need to make sure that the > request is really aborted by the time .bdrv_aio_cancel() returns. Shouldn't new drivers use coroutines instead of aio instead? (just poking around, I don't fully understand the new scheme myself yet either) > BDRV_O_NOCACHE is just for local files and sets the O_DIRECT hint. It > doesn't affect the cache semantics that the guest sees. Now that I fixed it it doesn't. But that's been a fairly recent change, which isn't always easy to pick up people having external patches. > > > +/* > > + * We support iscsi url's on the form > > + * iscsi://[%@][:]// > > + */ Is having username + password on the command line really a that good idea? Also what about the more complicated iSCSI authentification schemes? > What will happen if BDRV_SECTOR_SIZE is not a multiple of 512? hell will break lose for all of qemu.