replication.c (8385235ba99c53d1187658f2fc289b953a8090b1) replication.c (6cf42ca2f9782f0335abf3e6b611fbced40cd099)
1/*
2 * Replication Block filter
3 *
4 * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
5 * Copyright (c) 2016 Intel Corporation
6 * Copyright (c) 2016 FUJITSU LIMITED
7 *
8 * Author:

--- 376 unchanged lines hidden (view full) ---

385 if (s->orig_secondary_read_only) {
386 QDict *opts = qdict_new();
387 qdict_put_bool(opts, BDRV_OPT_READ_ONLY, !writable);
388 reopen_queue = bdrv_reopen_queue(reopen_queue, s->secondary_disk->bs,
389 opts, true);
390 }
391
392 if (reopen_queue) {
1/*
2 * Replication Block filter
3 *
4 * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
5 * Copyright (c) 2016 Intel Corporation
6 * Copyright (c) 2016 FUJITSU LIMITED
7 *
8 * Author:

--- 376 unchanged lines hidden (view full) ---

385 if (s->orig_secondary_read_only) {
386 QDict *opts = qdict_new();
387 qdict_put_bool(opts, BDRV_OPT_READ_ONLY, !writable);
388 reopen_queue = bdrv_reopen_queue(reopen_queue, s->secondary_disk->bs,
389 opts, true);
390 }
391
392 if (reopen_queue) {
393 AioContext *ctx = bdrv_get_aio_context(bs);
394 if (ctx != qemu_get_aio_context()) {
395 aio_context_release(ctx);
396 }
393 bdrv_reopen_multiple(reopen_queue, errp);
397 bdrv_reopen_multiple(reopen_queue, errp);
398 if (ctx != qemu_get_aio_context()) {
399 aio_context_acquire(ctx);
400 }
394 }
395
396 bdrv_subtree_drained_end(s->hidden_disk->bs);
397 bdrv_subtree_drained_end(s->secondary_disk->bs);
398}
399
400static void backup_job_cleanup(BlockDriverState *bs)
401{

--- 349 unchanged lines hidden ---
401 }
402
403 bdrv_subtree_drained_end(s->hidden_disk->bs);
404 bdrv_subtree_drained_end(s->secondary_disk->bs);
405}
406
407static void backup_job_cleanup(BlockDriverState *bs)
408{

--- 349 unchanged lines hidden ---