From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYtqG-0005xv-Bm for qemu-devel@nongnu.org; Mon, 07 Sep 2015 06:40:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYtqF-0001TB-GB for qemu-devel@nongnu.org; Mon, 07 Sep 2015 06:40:04 -0400 References: <1439552016-8557-1-git-send-email-pl@kamp.de> <55E41297.5000303@kamp.de> From: Paolo Bonzini Message-ID: <55ED6976.2010000@redhat.com> Date: Mon, 7 Sep 2015 12:39:50 +0200 MIME-Version: 1.0 In-Reply-To: <55E41297.5000303@kamp.de> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block/iscsi: validate block size returned from target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , qemu-devel@nongnu.org, qemu-block@nongnu.org Cc: andrey@xdel.ru, qemu-stable@nongnu.org, ronniesahlberg@gmail.com On 31/08/2015 10:38, Peter Lieven wrote: >> >> diff --git a/block/iscsi.c b/block/iscsi.c >> index 5002916..fac3a7a 100644 >> --- a/block/iscsi.c >> +++ b/block/iscsi.c >> @@ -1214,6 +1214,10 @@ static void iscsi_readcapacity_sync(IscsiLun >> *iscsilun, Error **errp) >> if (task == NULL || task->status != SCSI_STATUS_GOOD) { >> error_setg(errp, "iSCSI: failed to send readcapacity10 >> command."); >> + } else if (!iscsilun->block_size || >> + iscsilun->block_size % BDRV_SECTOR_SIZE) { >> + error_setg(errp, "iSCSI: the target returned an invalid " >> + "block size of %d.", iscsilun->block_size); >> } >> if (task) { >> scsi_free_scsi_task(task); > > Ping Queued but not sent due to KVM Forum and vacation. Paolo