• K
    block: Move cache options into options QDict · 91a097e7
    Kevin Wolf 提交于
    This adds the cache mode options to the QDict, so that they can be
    specified for child nodes (e.g. backing.cache.direct=off).
    
    The cache modes are not removed from the flags at this point; instead,
    options and flags are kept in sync. If the user specifies both flags and
    options, the options take precedence.
    
    Child node inherit cache modes as options now, they don't use flags any
    more.
    
    Note that this forbids specifying the cache mode for empty drives. It
    didn't make sense anyway to specify it there, because it didn't have any
    effect. blockdev_init() considers the cache options now bdrv_open()
    options and therefore doesn't create an empty drive any more but calls
    into bdrv_open(). This in turn will fail with no driver and filename
    specified.
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    Reviewed-by: NMax Reitz <mreitz@redhat.com>
    91a097e7
blockdev.c 117.4 KB