Skip to content
Snippets Groups Projects
  • Alberto Garcia's avatar
    ecd30d2d
    block: Allow changing bs->file on reopen · ecd30d2d
    Alberto Garcia authored
    
    When the x-blockdev-reopen was added it allowed reconfiguring the
    graph by replacing backing files, but changing the 'file' option was
    forbidden. Because of this restriction some operations are not
    possible, notably inserting and removing block filters.
    
    This patch adds support for replacing the 'file' option. This is
    similar to replacing the backing file and the user is likewise
    responsible for the correctness of the resulting graph, otherwise this
    can lead to data corruption.
    
    Signed-off-by: default avatarAlberto Garcia <berto@igalia.com>
     [vsementsov: bdrv_reopen_parse_file_or_backing() is modified a lot]
    Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Message-Id: <20210610120537.196183-9-vsementsov@virtuozzo.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    ecd30d2d
    History
    block: Allow changing bs->file on reopen
    Alberto Garcia authored
    
    When the x-blockdev-reopen was added it allowed reconfiguring the
    graph by replacing backing files, but changing the 'file' option was
    forbidden. Because of this restriction some operations are not
    possible, notably inserting and removing block filters.
    
    This patch adds support for replacing the 'file' option. This is
    similar to replacing the backing file and the user is likewise
    responsible for the correctness of the resulting graph, otherwise this
    can lead to data corruption.
    
    Signed-off-by: default avatarAlberto Garcia <berto@igalia.com>
     [vsementsov: bdrv_reopen_parse_file_or_backing() is modified a lot]
    Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Message-Id: <20210610120537.196183-9-vsementsov@virtuozzo.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>