block-backend.c (d45a5270d075ea589f0b0ddcf963a5fea1f500ac) block-backend.c (307261b243df2edde538f3ed5c9d80e168529355)
1/*
2 * QEMU Block backends
3 *
4 * Copyright (C) 2014-2016 Red Hat, Inc.
5 *
6 * Authors:
7 * Markus Armbruster <armbru@redhat.com>,
8 *

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

2264 * Updates the BlockBackendRootState object with data from the currently
2265 * attached BlockDriverState.
2266 */
2267void blk_update_root_state(BlockBackend *blk)
2268{
2269 assert(blk->root);
2270
2271 blk->root_state.open_flags = blk->root->bs->open_flags;
1/*
2 * QEMU Block backends
3 *
4 * Copyright (C) 2014-2016 Red Hat, Inc.
5 *
6 * Authors:
7 * Markus Armbruster <armbru@redhat.com>,
8 *

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

2264 * Updates the BlockBackendRootState object with data from the currently
2265 * attached BlockDriverState.
2266 */
2267void blk_update_root_state(BlockBackend *blk)
2268{
2269 assert(blk->root);
2270
2271 blk->root_state.open_flags = blk->root->bs->open_flags;
2272 blk->root_state.read_only = blk->root->bs->read_only;
2272 blk->root_state.read_only = bdrv_is_read_only(blk->root->bs);
2273 blk->root_state.detect_zeroes = blk->root->bs->detect_zeroes;
2274}
2275
2276/*
2277 * Returns the detect-zeroes setting to be used for bdrv_open() of a
2278 * BlockDriverState which is supposed to inherit the root state.
2279 */
2280bool blk_get_detect_zeroes_from_root_state(BlockBackend *blk)

--- 180 unchanged lines hidden ---
2273 blk->root_state.detect_zeroes = blk->root->bs->detect_zeroes;
2274}
2275
2276/*
2277 * Returns the detect-zeroes setting to be used for bdrv_open() of a
2278 * BlockDriverState which is supposed to inherit the root state.
2279 */
2280bool blk_get_detect_zeroes_from_root_state(BlockBackend *blk)

--- 180 unchanged lines hidden ---