From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrQi1-0008Lk-Ha for qemu-devel@nongnu.org; Tue, 25 Jun 2013 06:42:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrQhz-00069n-1s for qemu-devel@nongnu.org; Tue, 25 Jun 2013 06:42:49 -0400 Message-ID: <51C9741C.4070705@redhat.com> Date: Tue, 25 Jun 2013 12:42:36 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1372000028-27775-1-git-send-email-ronniesahlberg@gmail.com> <1372000028-27775-2-git-send-email-ronniesahlberg@gmail.com> <51C85A4B.8090603@redhat.com> <20130625092421.GC26177@stefanha-thinkpad.redhat.com> In-Reply-To: <20130625092421.GC26177@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Stefan Hajnoczi Cc: 1191606@bugs.launchpad.net, lersek@redhat.com, qemu-devel@nongnu.org, Ronnie Sahlberg , "1.5.x" Il 25/06/2013 11:24, Stefan Hajnoczi ha scritto: > On Mon, Jun 24, 2013 at 04:40:11PM +0200, Paolo Bonzini wrote: >> Il 23/06/2013 17:07, Ronnie Sahlberg ha scritto: >>> Don't assume that SG_IO is always invoked with a simple buffer, >>> check the iovec_count and if it is >= 1 then we need to pass an array >>> of iovectors to libiscsi instead of just a plain buffer. >>> >>> Signed-off-by: Ronnie Sahlberg >>> --- >>> block/iscsi.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++------- >>> 1 files changed, 49 insertions(+), 7 deletions(-) >> >> Cc: qemu-stable@nongnu.org >> >> Will apply to scsi-next in the next few days. > > Paolo, there are small whitespace issues that you might like to fix when > merging: Yup, will do. Paolo >>> + } else { >>> +#if defined(LIBISCSI_FEATURE_IOVECTOR) >>> + scsi_task_set_iov_out(acb->task, >>> + (struct scsi_iovec *) acb->ioh->dxferp, >>> + acb->ioh->iovec_count); > > Should be 4-space indentation. > >>> + #else > > Space before #else? >