aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-11-29 12:42:20 +0100
committerKevin Wolf <kwolf@redhat.com>2014-01-24 17:40:02 +0100
commitc25f53b06eba1575d5d0e92a0132455c97825b83 (patch)
treecf2b0c8ed726159431608cf097f9c89d022104aa /include
parent1b7fd729559c6d3b273303aa48bc653ceef08747 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/block/block_int.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index ae609bd4d6..5f9cecd65a 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -325,6 +325,9 @@ struct BlockDriverState {
/* Whether produces zeros when read beyond eof */
bool zero_beyond_eof;
+ /* Alignment requirement for offset/length of I/O requests */
+ unsigned int request_alignment;
+
/* the block size for which the guest device expects atomicity */
int guest_block_size;