diff options
author | Kevin Wolf <kwolf@redhat.com> | 2019-03-11 16:13:16 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-03-12 20:30:14 +0100 |
commit | 30855137783c0c762007044821a6f11e14e6af33 (patch) | |
tree | d30b921270e23e1d0852e0c18533c7967be4add6 /tests/qemu-iotests/051.pc.out | |
parent | 69b736e76567ecbc9b9e55570bc0afc840614a98 (diff) | |
download | qemu-30855137783c0c762007044821a6f11e14e6af33.zip qemu-30855137783c0c762007044821a6f11e14e6af33.tar.gz qemu-30855137783c0c762007044821a6f11e14e6af33.tar.bz2 |
file-posix: Fix bdrv_open_flags() for snapshot=on
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: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/051.pc.out')
-rw-r--r-- | tests/qemu-iotests/051.pc.out | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index 8c5c735..c4743cc 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -530,4 +530,13 @@ read 4096/4096 bytes at offset 0 Testing: -drive driver=null-co,snapshot=on QEMU_PROG: -drive driver=null-co,snapshot=on: Could not get temporary filename: No such file or directory +Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on,read-only=on,if=none,id=drive0 +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2"}}, "driver": "qcow2", "file": {"driver": "file", "filename": SNAPSHOT_PATH}} (qcow2, read-only) + Removable device: not locked, tray closed + Cache mode: writeback, ignore flushes + Backing file: TEST_DIR/t.qcow2 (chain depth: 1) +(qemu) quit + *** done |