[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v12 03/16] qemu-io: Set "share-rw" flag together wit
From: |
Fam Zheng |
Subject: |
[Qemu-block] [PATCH v12 03/16] qemu-io: Set "share-rw" flag together with read-only |
Date: |
Mon, 23 Jan 2017 20:30:43 +0800 |
qemu-io is a low level tool to read or modify guest visible data, which
implies the user knows very well what is being done. Allowing reading
from a locked image is harmless in most cases, so do it.
Signed-off-by: Fam Zheng <address@hidden>
---
qemu-io.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/qemu-io.c b/qemu-io.c
index 23a229f..f000504 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -585,6 +585,8 @@ int main(int argc, char **argv)
/* open the device */
if (!readonly) {
flags |= BDRV_O_RDWR;
+ } else {
+ flags |= BDRV_O_SHARE_RW;
}
if ((argc - optind) == 1) {
--
2.9.3
- [Qemu-block] [PATCH v12 00/16] block: Image locking series, Fam Zheng, 2017/01/23
- [Qemu-block] [PATCH v12 02/16] block: Define BDRV_O_SHARE_RW, Fam Zheng, 2017/01/23
- [Qemu-block] [PATCH v12 01/16] osdep: Add qemu_lock_fd and qemu_unlock_fd, Fam Zheng, 2017/01/23
- [Qemu-block] [PATCH v12 03/16] qemu-io: Set "share-rw" flag together with read-only,
Fam Zheng <=
- [Qemu-block] [PATCH v12 04/16] qemu-img: Set "share-rw" flag in read-only commands, Fam Zheng, 2017/01/23
- [Qemu-block] [PATCH v12 05/16] block: Set "share-rw" flag in drive-backup when sync=none, Fam Zheng, 2017/01/23
- [Qemu-block] [PATCH v12 06/16] iotests: 055: Don't attach the drive to vm for drive-backup, Fam Zheng, 2017/01/23
- [Qemu-block] [PATCH v12 07/16] iotests: 030: Read-only open image for getting map, Fam Zheng, 2017/01/23
- [Qemu-block] [PATCH v12 08/16] iotests: 087: Don't attach test image twice, Fam Zheng, 2017/01/23
- [Qemu-block] [PATCH v12 09/16] iotests: 085: Avoid image locking conflict, Fam Zheng, 2017/01/23
- [Qemu-block] [PATCH v12 10/16] iotests: 091: Quit QEMU before checking image, Fam Zheng, 2017/01/23
- [Qemu-block] [PATCH v12 11/16] iotests: 172: Use separate images for multiple devices, Fam Zheng, 2017/01/23
- [Qemu-block] [PATCH v12 12/16] tests: Use null-co:// instead of /dev/null as the dummy image, Fam Zheng, 2017/01/23
- [Qemu-block] [PATCH v12 13/16] tests: Disable image lock in test-replication, Fam Zheng, 2017/01/23