Il 15/07/2013 12:49, Peter Lieven ha scritto: > this adds the proposed solution to add a generic mechanism to zeroize > a target in qemu-img if it has discard_zeroes but has_zero_init is 0. > > Peter Lieven (4): > block: add discard_zeroes and max_unmap to BlockDriverInfo > iscsi: add .bdrv_get_info > block/raw: add .bdrv_get_info > qemu-img: conditionally discard target on convert > > block/iscsi.c | 19 +++++++++++++++-- > block/raw.c | 6 ++++++ > include/block/block.h | 5 +++++ > qemu-img.c | 56 > ++++++++++++++++++++++++++++++++++++++++++++++++- > 4 files changed, 83 insertions(+), 3 deletions(-) >
Looks good. Perhaps, as a followup, you can use max_unmap (which I'd rename to max_discard) in bdrv_co_discard to support splitting the request. You could also export the discard alignment in BlockDriverInfo. Paolo