[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Question] qemu-img convert block alignment
From: |
Zhenyu Ye |
Subject: |
[Question] qemu-img convert block alignment |
Date: |
Fri, 2 Apr 2021 11:52:25 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Question] qemu-img convert block alignment,
Zhenyu Ye <=