diff mbox

[PULL,v2,00/22] Docker and block patches

Message ID 6de62457-9674-1b90-72e0-9ea77b814bc9@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini June 5, 2017, 10:43 a.m. UTC
On 02/06/2017 23:30, Fam Zheng wrote:
> Cc'ing Paolo.
> 
> On Fri, 06/02 16:50, Peter Maydell wrote:
>> On 2 June 2017 at 09:10, Fam Zheng <famz@redhat.com> wrote:
>>> The following changes since commit 43771d5d92312504305c19abe29ec5bfabd55f01:
>>>
>>>   Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-05-31' into staging (2017-06-01 16:39:16 +0100)
>>>
>>> are available in the git repository at:
>>>
>>>   git://github.com/famz/qemu.git tags/docker-and-block-pull-request
>>>
>>> for you to fetch changes up to 4ab2cbc128f1938355a12970c9b6e419a63fcab6:
>>>
>>>   block: make accounting thread-safe (2017-06-02 15:59:32 +0800)
>>>
>>> ----------------------------------------------------------------
>>>
>>> v2: Fix building on OSX and BSD.

Seems to be a latent bug:


I'll shortly send it as a separate patch.

Thanks,

Paolo
diff mbox

Patch

diff --git a/blockdev.c b/blockdev.c
index 34a20d3b9a..7b54d43896 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -564,6 +564,8 @@  static BlockBackend *blockdev_init(const char *file, QDict *bs_opts,
         blk_rs->read_only     = read_only;
         blk_rs->detect_zeroes = detect_zeroes;
 
+        block_acct_init(blk_get_stats(blk), account_invalid, account_failed);
+
         QDECREF(bs_opts);
     } else {
         if (file && !*file) {