qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCHv2 10/20] iscsi: set limits in BlockDriverState


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCHv2 10/20] iscsi: set limits in BlockDriverState
Date: Thu, 19 Sep 2013 14:14:08 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 09/17/2013 07:48 AM, Peter Lieven wrote:
> Signed-off-by: Peter Lieven <address@hidden>
> ---
>  block/iscsi.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)

Reviewed-by: Eric Blake <address@hidden>

> 
> diff --git a/block/iscsi.c b/block/iscsi.c
> index aabcddb..21b1ecf 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -1362,6 +1362,16 @@ 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->max_discard = sector_lun2qemu(iscsilun->bl.max_unmap, 
> iscsilun);
> +        }
> +        bs->discard_alignment = sector_lun2qemu(iscsilun->bl.opt_unmap_gran, 
> iscsilun);
> +        
> +        if (iscsilun->bl.max_ws_len < 0xffffffff) {
> +            bs->max_write_zeroes = sector_lun2qemu(iscsilun->bl.max_ws_len, 
> iscsilun);
> +        }
> +        bs->write_zeroes_alignment = 
> sector_lun2qemu(iscsilun->bl.opt_unmap_gran, iscsilun);
>      }
>  
>  #if defined(LIBISCSI_FEATURE_NOP_COUNTER)
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]