On 11/25/2011 08:26 AM, Mark Wu wrote:
1. This patch aims to add 4k logical support for qemu running on a host with 4k logical block size, right?
No, it adds support for 512b logical block sizes running on a host with 4k logical block size and cache=none. This is suboptimal as it requires bounce buffers, but it can happen with migration and until libvirt provides a knob for the guest's logical block size.
For guest, we can use logical_block_size=4096 to achieve that even on a host with the logical_block_size of 512. Am I right?
Yes.
2. Can we just call bdrv_get_alignment in bdrv_open_common once and use the stored buffer_alignment for future usage instead of always calling bdrv_get_alignment in qemu_blockalign/qiov_is_aligned. What's the benefit of the dynamic way?
Yes, I think it's possible. Paolo