diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-06-05 14:38:55 +0200 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2017-06-16 07:55:00 +0800 |
commit | 850d54a2a9cf16f589f4aa40272515294671633f (patch) | |
tree | a56d8598543e525ca9d6710184794b9b17db6728 /include/block/block_int.h | |
parent | e2a6ae7fe57c17199624e4d47826ec46ca57d546 (diff) |
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>
Diffstat (limited to 'include/block/block_int.h')
-rw-r--r-- | include/block/block_int.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index cf544b7f31..091b5d361c 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -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; |