replication.c (f844ec01b36797e0e5f31f56bfbe49f8c24cc7d4) replication.c (bd86fb990cfedc50d9705b8ed31d183f01942035)
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:

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

158 if (s->mode == REPLICATION_MODE_SECONDARY) {
159 g_free(s->top_id);
160 }
161
162 replication_remove(s->rs);
163}
164
165static void replication_child_perm(BlockDriverState *bs, BdrvChild *c,
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:

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

158 if (s->mode == REPLICATION_MODE_SECONDARY) {
159 g_free(s->top_id);
160 }
161
162 replication_remove(s->rs);
163}
164
165static void replication_child_perm(BlockDriverState *bs, BdrvChild *c,
166 const BdrvChildRole *role,
166 const BdrvChildClass *child_class,
167 BlockReopenQueue *reopen_queue,
168 uint64_t perm, uint64_t shared,
169 uint64_t *nperm, uint64_t *nshared)
170{
171 *nperm = BLK_PERM_CONSISTENT_READ;
172 if ((bs->open_flags & (BDRV_O_INACTIVE | BDRV_O_RDWR)) == BDRV_O_RDWR) {
173 *nperm |= BLK_PERM_WRITE;
174 }

--- 578 unchanged lines hidden ---
167 BlockReopenQueue *reopen_queue,
168 uint64_t perm, uint64_t shared,
169 uint64_t *nperm, uint64_t *nshared)
170{
171 *nperm = BLK_PERM_CONSISTENT_READ;
172 if ((bs->open_flags & (BDRV_O_INACTIVE | BDRV_O_RDWR)) == BDRV_O_RDWR) {
173 *nperm |= BLK_PERM_WRITE;
174 }

--- 578 unchanged lines hidden ---