• K
    file-posix: Fix bdrv_open_flags() for snapshot=on · 30855137
    Kevin Wolf 提交于
    Using a different read-only setting for bs->open_flags than for the
    flags to the driver's open function is just inconsistent and a bad idea.
    After this patch, the temporary snapshot keeps being opened read-only if
    read-only=on,snapshot=on is passed.
    
    If we wanted to change this behaviour to make only the orginal image
    file read-only, but the temporary overlay read-write (as the comment in
    the removed code suggests), that change would have to be made in
    bdrv_temp_snapshot_options() (where the comment suggests otherwise).
    
    Addressing this inconsistency before introducing dynamic auto-read-only
    is important because otherwise we would immediately try to reopen the
    temporary overlay even though the file is already unlinked.
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    30855137
block.c 175.0 KB