• K
    block: Deprecate bdrv_set_read_only() and users · 398e6ad0
    Kevin Wolf 提交于
    bdrv_set_read_only() is used by some block drivers to override the
    read-only option given by the user. This is not how read-only images
    generally work in QEMU: Instead of second guessing what the user really
    meant (which currently includes making an image read-only even if the
    user didn't only use the default, but explicitly said read-only=off), we
    should error out if we can't provide what the user requested.
    
    This adds deprecation warnings to all callers of bdrv_set_read_only() so
    that the behaviour can be corrected after the usual deprecation period.
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    398e6ad0
block.c 149.7 KB