]> git.proxmox.com Git - mirror_qemu.git/commit - block/raw-posix.c
raw: Probe required direct I/O alignment
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 29 Nov 2011 11:42:20 +0000 (12:42 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 24 Jan 2014 16:40:02 +0000 (17:40 +0100)
commitc25f53b06eba1575d5d0e92a0132455c97825b83
treecf2b0c8ed726159431608cf097f9c89d022104aa
parent1b7fd729559c6d3b273303aa48bc653ceef08747
raw: Probe required direct I/O alignment

Add a bs->request_alignment field that contains the required
offset/length alignment for I/O requests and fill it in the raw block
drivers. Use ioctls if possible, else see what alignment it takes for
O_DIRECT to succeed.

While at it, also expose the memory alignment requirements, which may be
(and in practice are) different from the disk alignment requirements.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
block.c
block/raw-posix.c
block/raw-win32.c
include/block/block_int.h