From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZGsq-0007v4-4z for qemu-devel@nongnu.org; Thu, 24 Oct 2013 05:07:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZGsk-0002Ev-JU for qemu-devel@nongnu.org; Thu, 24 Oct 2013 05:07:12 -0400 Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]:44312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZGsk-0002Dy-Bo for qemu-devel@nongnu.org; Thu, 24 Oct 2013 05:07:06 -0400 Received: by mail-wi0-f175.google.com with SMTP id hm4so8638902wib.8 for ; Thu, 24 Oct 2013 02:07:05 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5268E335.9010009@redhat.com> Date: Thu, 24 Oct 2013 10:07:01 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1382600811-20043-1-git-send-email-pl@kamp.de> <1382600811-20043-12-git-send-email-pl@kamp.de> In-Reply-To: <1382600811-20043-12-git-send-email-pl@kamp.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv6 11/17] iscsi: set limits in BlockDriverState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, ronniesahlberg@gmail.com, qemu-devel@nongnu.org, stefanha@redhat.com Il 24/10/2013 08:46, Peter Lieven ha scritto: > Reviewed-by: Eric Blake > Signed-off-by: Peter Lieven > --- > block/iscsi.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/block/iscsi.c b/block/iscsi.c > index 47b9cc9..c0465aa 100644 > --- a/block/iscsi.c > +++ b/block/iscsi.c > @@ -1367,6 +1367,20 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags, > sizeof(struct scsi_inquiry_block_limits)); > scsi_free_scsi_task(task); > task = NULL; > + > + if (iscsilun->bl.max_unmap < 0xffffffff) { > + bs->bl.max_discard = sector_lun2qemu(iscsilun->bl.max_unmap, > + iscsilun); > + } > + bs->bl.discard_alignment = sector_lun2qemu(iscsilun->bl.opt_unmap_gran, > + iscsilun); > + > + if (iscsilun->bl.max_ws_len < 0xffffffff) { > + bs->bl.max_write_zeroes = sector_lun2qemu(iscsilun->bl.max_ws_len, > + iscsilun); > + } > + bs->bl.write_zeroes_alignment = sector_lun2qemu(iscsilun->bl.opt_unmap_gran, > + iscsilun); > } > > #if defined(LIBISCSI_FEATURE_NOP_COUNTER) > This patch and the previous one needs to be swapped, but maintainers can do that. Paolo