aboutsummaryrefslogtreecommitdiff
path: root/block/nbd-client.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-03-10 14:01:31 +0100
committerKevin Wolf <kwolf@redhat.com>2016-03-30 12:16:02 +0200
commit2b556518c3424caa4f40ee4f6199e8877488f5e8 (patch)
tree9684bbd86bc2f6e70a9018d6d7f3cbef76c4e25f /block/nbd-client.h
parent9f0eb9e129398d8907ec990b18c03f20ee0de15e (diff)
nbd: Support BDRV_REQ_FUA
The NBD server already used to send a FUA flag when the writethrough mode was set. This code was a remnant from the times where protocol drivers actually had to implement writethrough modes. Since nowadays the block layer sends flushes in writethrough mode and non-root nodes are always writeback, this was mostly dead code - only mostly because if NBD was configured to be used without a format, we sent _both_ FUA and an explicit flush afterwards, which makes the code not technically dead, but useless overhead. This patch changes the code so that the block layer's FUA flag is recognised and translated into a NBD FUA flag. The additional flush is avoided now. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/nbd-client.h')
-rw-r--r--block/nbd-client.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/nbd-client.h b/block/nbd-client.h
index 53f116d017..bc7aec0795 100644
--- a/block/nbd-client.h
+++ b/block/nbd-client.h
@@ -48,7 +48,7 @@ int nbd_client_co_discard(BlockDriverState *bs, int64_t sector_num,
int nb_sectors);
int nbd_client_co_flush(BlockDriverState *bs);
int nbd_client_co_writev(BlockDriverState *bs, int64_t sector_num,
- int nb_sectors, QEMUIOVector *qiov);
+ int nb_sectors, QEMUIOVector *qiov, int *flags);
int nbd_client_co_readv(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov);