summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Blake2019-03-29 05:27:49 +0100
committerEric Blake2019-04-01 15:46:52 +0200
commit4841211e0d1628cd386b35835676d7f6f9a4fa9d (patch)
tree1b8268090b537c4b264b2ba118b0d114297310a1 /include
parentnbd/client: Support qemu-img convert from unaligned size (diff)
downloadqemu-4841211e0d1628cd386b35835676d7f6f9a4fa9d.tar.gz
qemu-4841211e0d1628cd386b35835676d7f6f9a4fa9d.tar.xz
qemu-4841211e0d1628cd386b35835676d7f6f9a4fa9d.zip
block: Add bdrv_get_request_alignment()
The next patch needs access to a device's minimum permitted alignment, since NBD wants to advertise this to clients. Add an accessor function, borrowing from blk_get_max_transfer() for accessing a backend's block limits. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20190329042750.14704-6-eblake@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/sysemu/block-backend.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index e2066eb06b..3be05c2d68 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -177,6 +177,7 @@ bool blk_is_available(BlockBackend *blk);
void blk_lock_medium(BlockBackend *blk, bool locked);
void blk_eject(BlockBackend *blk, bool eject_flag);
int blk_get_flags(BlockBackend *blk);
+uint32_t blk_get_request_alignment(BlockBackend *blk);
uint32_t blk_get_max_transfer(BlockBackend *blk);
int blk_get_max_iov(BlockBackend *blk);
void blk_set_guest_block_size(BlockBackend *blk, int align);