qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCHv2 07/11] iscsi: let bdrv_create conditionally ze


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCHv2 07/11] iscsi: let bdrv_create conditionally zero out the device
Date: Tue, 02 Jul 2013 12:49:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

Il 02/07/2013 12:36, Peter Lieven ha scritto:
>>>> Perhaps we can have a new "discard_zeroes" field in bdrv_get_info, and
>>>> the unmap functionality can be moved up to qemu-img convert?
>>>
>>> Is there any other storage protocol out there that could benefit from it?
>>
>> Definitely LVM.  Perhaps in the future gluster too, though right now it
>> only supports discard on files, not block devices.
> 
> Is discards on LVM sth that is already implemented in qemu?

Yes, it supports BLKDISCARD (see handle_aiocb_discard in
block/raw-posix.c).  Of course there is no way to query the host
discard_zeroes setting yet.

But even if it weren't implemented in QEMU, you should aim at making it
easier (if it's not too much work, which it isn't), not harder.  If you
do it in block/iscsi.c, the next person who comes will have to basically
undo your work and reimplement+retest it with the right API.

> Would you mind if we postpone the general approach to a later point.
> It seems that this is much more complex than the iSCSI approach.

It shouldn't be more complex at all, actually.  You just need to pass
the maximum unmap sectors and lbprz parameters through bdrv_get_info.

I'm not asking you to add support for BLKDISCARDZEROES and all that.
I'm asking you to do the work at the right level.

Paolo





reply via email to

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