[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Question] qemu-img convert block alignment
From: |
Zhenyu Ye |
Subject: |
Re: [Question] qemu-img convert block alignment |
Date: |
Tue, 3 Aug 2021 09:53:38 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 |
ping?
On 2021/4/2 11:52, Zhenyu Ye wrote:
> Hi all,
>
> commit 8dcd3c9b91 ("qemu-img: align result of is_allocated_sectors")
> introduces block alignment when doing qemu-img convert. However, the
> alignment is:
>
> s.alignment = MAX(pow2floor(s.min_sparse),
> DIV_ROUND_UP(out_bs->bl.request_alignment,
> BDRV_SECTOR_SIZE));
>
> (where the default s.min_sparse is 8)
> When the target device's bl.request_alignment is smaller than 4K, this
> will cause additional write-zero overhead and makes the size of target
> file larger.
>
> Is this as expected? Should we change the MAX() to MIN()?
>
>
> Thanks,
> zhenyu
>
- Re: [Question] qemu-img convert block alignment,
Zhenyu Ye <=