summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-05-06 10:26:27 -0600
committerKevin Wolf <kwolf@redhat.com>2016-05-12 15:22:08 +0200
commit8341f00dc207b80a1b2e7c7784890c9b0446d062 (patch)
treee2ff324dc93b8b03a5dff95e6fd576116591aad3 /include
parent0e01b76e7cc43068f6b8cc05297f61539ccd5279 (diff)
downloadqemu-8341f00dc207b80a1b2e7c7784890c9b0446d062.zip
block: Allow BDRV_REQ_FUA through blk_pwrite()
We have several block drivers that understand BDRV_REQ_FUA, and emulate it in the block layer for the rest by a full flush. But without a way to actually request BDRV_REQ_FUA during a pass-through blk_pwrite(), FUA-aware block drivers like NBD are forced to repeat the emulation logic of a full flush regardless of whether the backend they are writing to could do it more efficiently. This patch just wires up a flags argument; followup patches will actually make use of it in the NBD driver and in qemu-io. Signed-off-by: Eric Blake <eblake@redhat.com> Acked-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/sysemu/block-backend.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index c62b6fe96d..6991b2610c 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -102,7 +102,8 @@ BlockAIOCB *blk_aio_write_zeroes(BlockBackend *blk, int64_t sector_num,
int nb_sectors, BdrvRequestFlags flags,
BlockCompletionFunc *cb, void *opaque);
int blk_pread(BlockBackend *blk, int64_t offset, void *buf, int count);
-int blk_pwrite(BlockBackend *blk, int64_t offset, const void *buf, int count);
+int blk_pwrite(BlockBackend *blk, int64_t offset, const void *buf, int count,
+ BdrvRequestFlags flags);
int64_t blk_getlength(BlockBackend *blk);
void blk_get_geometry(BlockBackend *blk, uint64_t *nb_sectors_ptr);
int64_t blk_nb_sectors(BlockBackend *blk);