Il 24/06/2013 18:24, Peter Lieven ha scritto: >> > So far, 4K blocksize is usable if you also specify the same block size >> > for the guest device. I have posted once the patches to do >> > read-modify-write, but I never really pursued inclusion of those. >> > >> > In any case, the right place to fix this is the block layer; >> > driver-specific hacks are... hacks. :) > Where do I find the sector size if not in BDRV_SECTOR_SIZE? > Is there a dynamic field or is the answer qemu only support 512 Byte > sector size at the moment?
bdrv_read/write and friends are always in 512-byte units. There is bs->buffer_alignment for the guest sector size, but it is not set at bdrv_open, only later. So I think QEMU support for bigger sectors is too sparse to be useful. > So you would go for fail to open a device if the LUN blocksize is > not equal to BDRV_SECTOR_SIZE? Either that, or fails reads/writes that are not aligned. Paolo