Received: from eggs.gnu.org ([2001:4830:134:3::10]:56887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrPRq-0001SK-Cj for qemu-devel@nongnu.org; Tue, 25 Jun 2013 05:22:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrPRn-0000sz-2s for qemu-devel@nongnu.org; Tue, 25 Jun 2013 05:22:02 -0400 Received: from mail-ea0-x234.google.com ([2a00:1450:4013:c01::234]:36111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrPRm-0000sf-TB for qemu-devel@nongnu.org; Tue, 25 Jun 2013 05:21:59 -0400 Received: by mail-ea0-f180.google.com with SMTP id k10so6684383eaj.25 for ; Tue, 25 Jun 2013 02:21:57 -0700 (PDT) Date: Tue, 25 Jun 2013 11:21:54 +0200 From: Stefan Hajnoczi Message-ID: <20130625092154.GB26177@stefanha-thinkpad.redhat.com> References: <1371865038-20821-1-git-send-email-ronniesahlberg@gmail.com> <1371865038-20821-2-git-send-email-ronniesahlberg@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1371865038-20821-2-git-send-email-ronniesahlberg@gmail.com> Subject: Re: [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ronnie Sahlberg Cc: pbonzini@redhat.com, 1191606@bugs.launchpad.net, lersek@redhat.com, qemu-devel@nongnu.org On Fri, Jun 21, 2013 at 06:37:18PM -0700, Ronnie Sahlberg wrote: Looks fine except these whitespace issues: > @@ -727,14 +730,36 @@ static BlockDriverAIOCB *iscsi_aio_ioctl(BlockDriverState *bs, > memcpy(&acb->task->cdb[0], acb->ioh->cmdp, acb->ioh->cmd_len); > acb->task->expxferlen = acb->ioh->dxfer_len; > > + data.size = 0; > if (acb->task->xfer_dir == SCSI_XFER_WRITE) { > - data.data = acb->ioh->dxferp; > - data.size = acb->ioh->dxfer_len; > + if (acb->ioh->iovec_count == 0) { > + data.data = acb->ioh->dxferp; > + data.size = acb->ioh->dxfer_len; > + } else { > +#if defined(LIBISCSI_FEATURE_IOVECTOR) > + scsi_task_set_iov_out(acb->task, Indentation should be 4 spaces. > + (struct scsi_iovec *) acb->ioh->dxferp, > + acb->ioh->iovec_count); > + #else Space before #else?