qemu/block.c
/*
 * Returns the options and flags that bs->backing should get, based on the
 * given options and flags for the parent BDS
 */
Returns the options and flags that bs->backing should get, based on the
given options and flags for the parent BDS
Returns the options and flags that bs - > backing should get based on the given options and flags for the parent BDS
static void bdrv_backing_options(int *child_flags, QDict *child_options,
                                 int parent_flags, QDict *parent_options)
{
    int flags = parent_flags;
    qdict_copy_default(child_options, parent_options, BDRV_OPT_CACHE_DIRECT);
    qdict_copy_default(child_options, parent_options, BDRV_OPT_CACHE_NO_FLUSH);
    qdict_copy_default(child_options, parent_options, BDRV_OPT_FORCE_SHARE);
    qdict_set_default_str(child_options, BDRV_OPT_READ_ONLY, "on");
    qdict_set_default_str(child_options, BDRV_OPT_AUTO_READ_ONLY, "off");
    flags &= ~BDRV_O_COPY_ON_READ;
    flags &= ~(BDRV_O_SNAPSHOT | BDRV_O_TEMPORARY);
    *child_flags = flags;
}
static void bdrv_backing_options ( int * child_flags , QDict * child_options , int parent_flags , QDict * parent_options ) { int flags = parent_flags ; qdict_copy_default ( child_options , parent_options , BDRV_OPT_CACHE_DIRECT ) ; qdict_copy_default ( child_options , parent_options , BDRV_OPT_CACHE_NO_FLUSH ) ; qdict_copy_default ( child_options , parent_options , BDRV_OPT_FORCE_SHARE ) ; qdict_set_default_str ( child_options , BDRV_OPT_READ_ONLY , " " ) ; qdict_set_default_str ( child_options , BDRV_OPT_AUTO_READ_ONLY , " " ) ; flags &= ~ BDRV_O_COPY_ON_READ ; flags &= ~ ( BDRV_O_SNAPSHOT | BDRV_O_TEMPORARY ) ; * child_flags = flags ; }
Returns the options and flags that bs->backing should get, based on the
 given options and flags for the parent BDS
Returns the options and flags that bs - > backing should get based on the given options and flags for the parent BDS
/* The cache mode is inherited unmodified for backing files; except WCE,
     * which is only applied on the top level (BlockBackend) */ /* backing files always opened read-only */ /* snapshot=on is handled on the top layer */