mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
block: access io_plugged with atomic ops
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20170605123908.18777-7-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
This commit is contained in:
parent
e2a6ae7fe5
commit
850d54a2a9
2 changed files with 7 additions and 5 deletions
|
@ -611,9 +611,6 @@ struct BlockDriverState {
|
|||
uint64_t write_threshold_offset;
|
||||
NotifierWithReturn write_threshold_notifier;
|
||||
|
||||
/* counter for nested bdrv_io_plug */
|
||||
unsigned io_plugged;
|
||||
|
||||
QLIST_HEAD(, BdrvTrackedRequest) tracked_requests;
|
||||
CoQueue flush_queue; /* Serializing flush queue */
|
||||
bool active_flush_req; /* Flush request in flight? */
|
||||
|
@ -639,6 +636,11 @@ struct BlockDriverState {
|
|||
*/
|
||||
bool wakeup;
|
||||
|
||||
/* counter for nested bdrv_io_plug.
|
||||
* Accessed with atomic ops.
|
||||
*/
|
||||
unsigned io_plugged;
|
||||
|
||||
/* do we need to tell the quest if we have a volatile write cache? */
|
||||
int enable_write_cache;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue