raw: Probe required direct I/O alignment
Add a bs->request_alignment field that contains the requiredoffset/length alignment for I/O requests and fill it in the raw blockdrivers. Use ioctls if possible, else see what alignment it takes forO_DIRECT to succeed....
block: Introduce bdrv_aligned_preadv()
This separates the part of bdrv_co_do_readv() that needs to happenbefore the request is modified to match the backend alignment, and apart that needs to be executed afterwards and passes the request to theBlockDriver....
block: Introduce bdrv_co_do_preadv()
Similar to bdrv_pread(), which aligns byte-aligned request to 512 bytesectors, bdrv_co_do_preadv() takes a byte-aligned request and aligns itto the alignment specified in bs->request_alignment.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
block: Introduce bdrv_aligned_pwritev()
This separates the part of bdrv_co_do_writev() that needs to happenbefore the request is modified to match the backend alignment, and apart that needs to be executed afterwards and passes the request to theBlockDriver....
block: write: Handle COR dependency after I/O throttling
First waiting for all COR requests to complete and calling thethrottling function afterwards means that the request could be delayedand we still need to wait for the COR request even if it was issued only...
block: Introduce bdrv_co_do_pwritev()
This is going to become the bdrv_co_do_preadv() equivalent for writes.In this patch, however, just a function taking byte offsets is created,it doesn't align anything yet.
block: Switch BdrvTrackedRequest to byte granularity
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Max Reitz <mreitz@redhat.com>Reviewed-by: Benoit Canet <benoit@irqsave.net>
block: Detect unaligned length in bdrv_qiov_is_aligned()
For an O_DIRECT request to succeed, it's not only necessary that allbase addresses in the qiov are aligned, but also that each length in itis aligned.
block: Don't use guest sector size for qemu_blockalign()
bs->buffer_alignment is set by the device emulation and contains thelogical block size of the guest device. This isn't something that theblock layer should know, and even less something to use for determining...
block: rename buffer_alignment to guest_block_size
The alignment field is now set to the value that is promised to theguest, rather than required by the host. The next patches will makeQEMU aware of the host-provided values, so make this clear.
The alignment is also not about memory buffers, but about the sectors on...
View all revisions | View revisions
Also available in: Atom