summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-06-16 16:38:15 +0200
committerDoug Goldstein <cardoe@gentoo.org>2010-07-20 17:41:09 -0500
commit193ad843cd3579eea4705493d1878360fa624428 (patch)
tree793c656dce66dc9a75a453ed22f5a513b331f65f /block_int.h
parentqcow2: Restore L1 entry on l2_allocate failure (diff)
downloadqemu-kvm-193ad843cd3579eea4705493d1878360fa624428.tar.gz
qemu-kvm-193ad843cd3579eea4705493d1878360fa624428.tar.bz2
qemu-kvm-193ad843cd3579eea4705493d1878360fa624428.zip
block: Add bdrv_(p)write_sync
Add new functions that write and flush the written data to disk immediately. This is what needs to be used for image format metadata to maintain integrity for cache=... modes that don't use O_DSYNC. (Actually, we only need barriers, and therefore the functions are defined as such, but flushes is what is implemented in this patch - we can try to change that later) Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit f08145fe16470aca09304099888f68cfbc5d1de7)
Diffstat (limited to 'block_int.h')
-rw-r--r--block_int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/block_int.h b/block_int.h
index 9a3b2e09d..631e8c56d 100644
--- a/block_int.h
+++ b/block_int.h
@@ -127,6 +127,7 @@ struct BlockDriverState {
int64_t total_sectors; /* if we are reading a disk image, give its
size in sectors */
int read_only; /* if true, the media is read only */
+ int open_flags; /* flags used to open the file, re-used for re-open */
int removable; /* if true, the media can be removed */
int locked; /* if true, the media cannot temporarily be ejected */
int encrypted; /* if true, the media is encrypted */