diff options
author | Eric Blake <eblake@redhat.com> | 2016-05-06 10:26:27 -0600 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-05-12 15:22:08 +0200 |
commit | 8341f00dc207b80a1b2e7c7784890c9b0446d062 (patch) | |
tree | e2ff324dc93b8b03a5dff95e6fd576116591aad3 /hw/nvram/spapr_nvram.c | |
parent | 0e01b76e7cc43068f6b8cc05297f61539ccd5279 (diff) |
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 'hw/nvram/spapr_nvram.c')
-rw-r--r-- | hw/nvram/spapr_nvram.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c index 802636ef35..019f25dc58 100644 --- a/hw/nvram/spapr_nvram.c +++ b/hw/nvram/spapr_nvram.c @@ -124,7 +124,7 @@ static void rtas_nvram_store(PowerPCCPU *cpu, sPAPRMachineState *spapr, alen = len; if (nvram->blk) { - alen = blk_pwrite(nvram->blk, offset, membuf, len); + alen = blk_pwrite(nvram->blk, offset, membuf, len, 0); } assert(nvram->buf); @@ -190,7 +190,7 @@ static int spapr_nvram_post_load(void *opaque, int version_id) sPAPRNVRAM *nvram = VIO_SPAPR_NVRAM(opaque); if (nvram->blk) { - int alen = blk_pwrite(nvram->blk, 0, nvram->buf, nvram->size); + int alen = blk_pwrite(nvram->blk, 0, nvram->buf, nvram->size, 0); if (alen < 0) { return alen; |