|
Pablo Greco |
e6a3ae |
From 494baebd78587465d90b9e873cd88c0a83ca52f9 Mon Sep 17 00:00:00 2001
|
|
Pablo Greco |
e6a3ae |
From: Max Reitz <mreitz@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Date: Wed, 3 Apr 2019 17:13:09 +0100
|
|
Pablo Greco |
e6a3ae |
Subject: [PATCH 02/11] file-posix: Include filename in locking error message
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
RH-Author: Max Reitz <mreitz@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Message-id: <20190403171315.20841-3-mreitz@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Patchwork-id: 85400
|
|
Pablo Greco |
e6a3ae |
O-Subject: [RHEL-8.1 qemu-kvm PATCH 2/8] file-posix: Include filename in locking error message
|
|
Pablo Greco |
e6a3ae |
Bugzilla: 1694148
|
|
Pablo Greco |
e6a3ae |
RH-Acked-by: John Snow <jsnow@redhat.com>
|
|
Pablo Greco |
e6a3ae |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
Pablo Greco |
e6a3ae |
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
From: Fam Zheng <famz@redhat.com>
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
Image locking errors happening at device initialization time doesn't say
|
|
Pablo Greco |
e6a3ae |
which file cannot be locked, for instance,
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
-device scsi-disk,drive=drive-1: Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
could refer to either the overlay image or its backing image.
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
Hoist the error_append_hint to the caller of raw_check_lock_bytes where
|
|
Pablo Greco |
e6a3ae |
file name is known, and include it in the error hint.
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
Pablo Greco |
e6a3ae |
(cherry picked from commit b857431d2abe3945b672b41f33690e9943a8752a)
|
|
Pablo Greco |
e6a3ae |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
Pablo Greco |
e6a3ae |
---
|
|
Pablo Greco |
e6a3ae |
block/file-posix.c | 10 +++---
|
|
Pablo Greco |
e6a3ae |
tests/qemu-iotests/153.out | 76 +++++++++++++++++++++++-----------------------
|
|
Pablo Greco |
e6a3ae |
tests/qemu-iotests/182.out | 2 +-
|
|
Pablo Greco |
e6a3ae |
3 files changed, 45 insertions(+), 43 deletions(-)
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
diff --git a/block/file-posix.c b/block/file-posix.c
|
|
Pablo Greco |
e6a3ae |
index 7e6869d..c2403ba 100644
|
|
Pablo Greco |
e6a3ae |
--- a/block/file-posix.c
|
|
Pablo Greco |
e6a3ae |
+++ b/block/file-posix.c
|
|
Pablo Greco |
e6a3ae |
@@ -738,8 +738,6 @@ static int raw_check_lock_bytes(int fd, uint64_t perm, uint64_t shared_perm,
|
|
Pablo Greco |
e6a3ae |
"Failed to get \"%s\" lock",
|
|
Pablo Greco |
e6a3ae |
perm_name);
|
|
Pablo Greco |
e6a3ae |
g_free(perm_name);
|
|
Pablo Greco |
e6a3ae |
- error_append_hint(errp,
|
|
Pablo Greco |
e6a3ae |
- "Is another process using the image?\n");
|
|
Pablo Greco |
e6a3ae |
return ret;
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
@@ -755,8 +753,6 @@ static int raw_check_lock_bytes(int fd, uint64_t perm, uint64_t shared_perm,
|
|
Pablo Greco |
e6a3ae |
"Failed to get shared \"%s\" lock",
|
|
Pablo Greco |
e6a3ae |
perm_name);
|
|
Pablo Greco |
e6a3ae |
g_free(perm_name);
|
|
Pablo Greco |
e6a3ae |
- error_append_hint(errp,
|
|
Pablo Greco |
e6a3ae |
- "Is another process using the image?\n");
|
|
Pablo Greco |
e6a3ae |
return ret;
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
@@ -793,6 +789,9 @@ static int raw_handle_perm_lock(BlockDriverState *bs,
|
|
Pablo Greco |
e6a3ae |
if (!ret) {
|
|
Pablo Greco |
e6a3ae |
return 0;
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
+ error_append_hint(errp,
|
|
Pablo Greco |
e6a3ae |
+ "Is another process using the image [%s]?\n",
|
|
Pablo Greco |
e6a3ae |
+ bs->filename);
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
op = RAW_PL_ABORT;
|
|
Pablo Greco |
e6a3ae |
/* fall through to unlock bytes. */
|
|
Pablo Greco |
e6a3ae |
@@ -2169,6 +2168,9 @@ raw_co_create(BlockdevCreateOptions *options, Error **errp)
|
|
Pablo Greco |
e6a3ae |
/* Step two: Check that nobody else has taken conflicting locks */
|
|
Pablo Greco |
e6a3ae |
result = raw_check_lock_bytes(fd, perm, shared, errp);
|
|
Pablo Greco |
e6a3ae |
if (result < 0) {
|
|
Pablo Greco |
e6a3ae |
+ error_append_hint(errp,
|
|
Pablo Greco |
e6a3ae |
+ "Is another process using the image [%s]?\n",
|
|
Pablo Greco |
e6a3ae |
+ file_opts->filename);
|
|
Pablo Greco |
e6a3ae |
goto out_unlock;
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
diff --git a/tests/qemu-iotests/153.out b/tests/qemu-iotests/153.out
|
|
Pablo Greco |
e6a3ae |
index 93eaf10..8842548 100644
|
|
Pablo Greco |
e6a3ae |
--- a/tests/qemu-iotests/153.out
|
|
Pablo Greco |
e6a3ae |
+++ b/tests/qemu-iotests/153.out
|
|
Pablo Greco |
e6a3ae |
@@ -12,11 +12,11 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Launching another QEMU, opts: '' ==
|
|
Pablo Greco |
e6a3ae |
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=none,: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Launching another QEMU, opts: 'read-only=on' ==
|
|
Pablo Greco |
e6a3ae |
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=none,read-only=on: Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Launching another QEMU, opts: 'read-only=on,force-share=on' ==
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
@@ -24,77 +24,77 @@ Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_io_wrapper -c read 0 512 TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_io_wrapper -r -c read 0 512 TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
can't open device TEST_DIR/t.qcow2: Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_io_wrapper -c open TEST_DIR/t.qcow2 -c read 0 512
|
|
Pablo Greco |
e6a3ae |
can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
no file open, try 'help open'
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_io_wrapper -c open -r TEST_DIR/t.qcow2 -c read 0 512
|
|
Pablo Greco |
e6a3ae |
can't open device TEST_DIR/t.qcow2: Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
no file open, try 'help open'
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper info TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper check TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper compare TEST_DIR/t.qcow2 TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper map TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper amend -o TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper commit TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper resize TEST_DIR/t.qcow2 32M
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper rebase TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper snapshot -l TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper convert TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper dd if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper bench -c 1 TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper bench -w -c 1 TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper create -f qcow2 TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base
|
|
Pablo Greco |
e6a3ae |
qemu-img: TEST_DIR/t.qcow2: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
file format: IMGFMT
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Running utility commands -U ==
|
|
Pablo Greco |
e6a3ae |
@@ -132,7 +132,7 @@ Try 'qemu-img --help' for more information
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper rebase -U TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper snapshot -l -U TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
@@ -157,7 +157,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Launching another QEMU, opts: '' ==
|
|
Pablo Greco |
e6a3ae |
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=none,: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Launching another QEMU, opts: 'read-only=on' ==
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
@@ -167,13 +167,13 @@ Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_io_wrapper -c read 0 512 TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_io_wrapper -r -c read 0 512 TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_io_wrapper -c open TEST_DIR/t.qcow2 -c read 0 512
|
|
Pablo Greco |
e6a3ae |
can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
no file open, try 'help open'
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_io_wrapper -c open -r TEST_DIR/t.qcow2 -c read 0 512
|
|
Pablo Greco |
e6a3ae |
@@ -188,19 +188,19 @@ _qemu_img_wrapper map TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper amend -o TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper commit TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper resize TEST_DIR/t.qcow2 32M
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper rebase TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper snapshot -l TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
@@ -212,11 +212,11 @@ _qemu_img_wrapper bench -c 1 TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper bench -w -c 1 TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper create -f qcow2 TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base
|
|
Pablo Greco |
e6a3ae |
qemu-img: TEST_DIR/t.qcow2: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
file format: IMGFMT
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Running utility commands -U ==
|
|
Pablo Greco |
e6a3ae |
@@ -254,7 +254,7 @@ Try 'qemu-img --help' for more information
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper rebase -U TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base
|
|
Pablo Greco |
e6a3ae |
qemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper snapshot -l -U TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
@@ -372,17 +372,17 @@ Round done
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Two devices with the same image (read-only=off - read-only=off) ==
|
|
Pablo Greco |
e6a3ae |
QEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2,read-only=off: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Two devices with the same image (read-only=off - read-only=on) ==
|
|
Pablo Greco |
e6a3ae |
QEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2,read-only=on: Failed to get shared "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Two devices with the same image (read-only=off - read-only=on,force-share=on) ==
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Two devices with the same image (read-only=on - read-only=off) ==
|
|
Pablo Greco |
e6a3ae |
QEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2,read-only=off: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Two devices with the same image (read-only=on - read-only=on) ==
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
@@ -403,13 +403,13 @@ Formatting 'TEST_DIR/t.IMGFMT.c', fmt=IMGFMT size=33554432 backing_file=TEST_DIR
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Backing image also as an active device ==
|
|
Pablo Greco |
e6a3ae |
QEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Backing image also as an active device (ro) ==
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Symbolic link ==
|
|
Pablo Greco |
e6a3ae |
QEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
== Active commit to intermediate layer should work when base in use ==
|
|
Pablo Greco |
e6a3ae |
{"return": {}}
|
|
Pablo Greco |
e6a3ae |
@@ -420,7 +420,7 @@ Adding drive
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
|
|
Pablo Greco |
e6a3ae |
can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
Creating overlay with qemu-img when the guest is running should be allowed
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_img_wrapper create -f qcow2 -b TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.overlay
|
|
Pablo Greco |
e6a3ae |
@@ -433,7 +433,7 @@ _qemu_img_wrapper info TEST_DIR/t.qcow2
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
|
|
Pablo Greco |
e6a3ae |
can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
Closing the other
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
|
|
Pablo Greco |
e6a3ae |
diff --git a/tests/qemu-iotests/182.out b/tests/qemu-iotests/182.out
|
|
Pablo Greco |
e6a3ae |
index 23a4dbf..f1463c8 100644
|
|
Pablo Greco |
e6a3ae |
--- a/tests/qemu-iotests/182.out
|
|
Pablo Greco |
e6a3ae |
+++ b/tests/qemu-iotests/182.out
|
|
Pablo Greco |
e6a3ae |
@@ -4,5 +4,5 @@ Starting QEMU
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
Starting a second QEMU using the same image should fail
|
|
Pablo Greco |
e6a3ae |
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=none,id=drive0,file.locking=on: Failed to get "write" lock
|
|
Pablo Greco |
e6a3ae |
-Is another process using the image?
|
|
Pablo Greco |
e6a3ae |
+Is another process using the image [TEST_DIR/t.qcow2]?
|
|
Pablo Greco |
e6a3ae |
*** done
|
|
Pablo Greco |
e6a3ae |
--
|
|
Pablo Greco |
e6a3ae |
1.8.3.1
|
|
Pablo Greco |
e6a3ae |
|