diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-06-05 14:38:50 +0200 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2017-06-16 07:55:00 +0800 |
commit | d3faa13e5ffda779dcd58f39e8745370adb05d67 (patch) | |
tree | adc8d74261b334cba0a0bc52e30466af3c4694eb /include | |
parent | 79f24568e5e70892b9bf4712f88b26f52255077f (diff) | |
download | qemu-d3faa13e5ffda779dcd58f39e8745370adb05d67.zip qemu-d3faa13e5ffda779dcd58f39e8745370adb05d67.tar.gz qemu-d3faa13e5ffda779dcd58f39e8745370adb05d67.tar.bz2 |
block: access copy_on_read with atomic ops
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20170605123908.18777-2-pbonzini@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block_int.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index cb78c4f..49f2ebb 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -595,11 +595,6 @@ struct BlockDriverState { /* Protected by AioContext lock */ - /* If true, copy read backing sectors into image. Can be >1 if more - * than one client has requested copy-on-read. - */ - int copy_on_read; - /* If we are reading a disk image, give its size in sectors. * Generally read-only; it is written to by load_snapshot and * save_snaphost, but the block layer is quiescent during those. @@ -633,6 +628,12 @@ struct BlockDriverState { QLIST_HEAD(, BdrvDirtyBitmap) dirty_bitmaps; + /* If true, copy read backing sectors into image. Can be >1 if more + * than one client has requested copy-on-read. Accessed with atomic + * ops. + */ + int copy_on_read; + /* do we need to tell the quest if we have a volatile write cache? */ int enable_write_cache; |