[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 32/97] vl: Fix -drive / -blockdev persistent reservation manageme
From: |
Michael Roth |
Subject: |
[PATCH 32/97] vl: Fix -drive / -blockdev persistent reservation management |
Date: |
Tue, 1 Oct 2019 18:45:11 -0500 |
From: Markus Armbruster <address@hidden>
qemu-system-FOO's main() acts on command line arguments in its own
idiosyncratic order. There's not much method to its madness.
Whenever we find a case where one kind of command line argument needs
to refer to something created for another kind later, we rejigger the
order.
Recent commit cda4aa9a5a "vl: Create block backends before setting
machine properties" was such a rejigger. Block backends are now
created before "delayed" objects. This broke persistent reservation
management. Reproducer:
$ qemu-system-x86_64 -object
pr-manager-helper,id=pr-helper0,path=/tmp/pr-helper0.sock-drive -drive
file=/dev/mapper/crypt,file.pr-manager=pr-helper0,format=raw,if=none,id=drive-scsi0-0-0-2
qemu-system-x86_64: -drive
file=/dev/mapper/crypt,file.pr-manager=pr-helper0,format=raw,if=none,id=drive-scsi0-0-0-2:
No persistent reservation manager with id 'pr-helper0'
The delayed pr-manager-helper object is created too late for use by
-drive or -blockdev. Normal objects are still created in time.
pr-manager-helper has always been a delayed object (commit 7c9e527659
"scsi, file-posix: add support for persistent reservation
management"). Turns out there's no real reason for that. Make it a
normal object.
Fixes: cda4aa9a5a08777cf13e164c0543bd4888b8adce
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michal Privoznik <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 9ea18ed25a36527167e9676f25d983df5e7f76e6)
Signed-off-by: Michael Roth <address@hidden>
---
vl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/vl.c b/vl.c
index c696ad2a13..c3dee09c9b 100644
--- a/vl.c
+++ b/vl.c
@@ -2825,8 +2825,7 @@ static bool object_create_initial(const char *type,
QemuOpts *opts)
exit(0);
}
- if (g_str_equal(type, "rng-egd") ||
- g_str_has_prefix(type, "pr-manager-")) {
+ if (g_str_equal(type, "rng-egd")) {
return false;
}
--
2.17.1
- [PATCH 02/97] qcow2: Add errp to preallocate_co(), (continued)
- [PATCH 02/97] qcow2: Add errp to preallocate_co(), Michael Roth, 2019/10/01
- [PATCH 33/97] target/i386: add MDS-NO feature, Michael Roth, 2019/10/01
- [PATCH 31/97] q35: Revert to kernel irqchip, Michael Roth, 2019/10/01
- [PATCH 28/97] target/ppc: Fix xxbrq, xxbrw, Michael Roth, 2019/10/01
- [PATCH 30/97] target/ppc: Fix lxvw4x, lxvh8x and lxvb16x, Michael Roth, 2019/10/01
- [PATCH 29/97] target/ppc: Fix vsum2sws, Michael Roth, 2019/10/01
- [PATCH 40/97] sphinx: add qmp_lexer, Michael Roth, 2019/10/01
- [PATCH 39/97] docs/interop/bitmaps.rst: Fix typos, Michael Roth, 2019/10/01
- [PATCH 46/97] i386/acpi: show PCI Express bus on pxb-pcie expanders, Michael Roth, 2019/10/01
- [PATCH 03/97] qcow2: Fix full preallocation with external data file, Michael Roth, 2019/10/01
- [PATCH 32/97] vl: Fix -drive / -blockdev persistent reservation management,
Michael Roth <=
- [PATCH 38/97] virtio-balloon: fix QEMU 4.0 config size migration incompatibility, Michael Roth, 2019/10/01
- [PATCH 49/97] virtio-balloon: Simplify deflate with pbp, Michael Roth, 2019/10/01
- [PATCH 42/97] hw/ssi/xilinx_spips: Convert lqspi_read() to read_with_attrs, Michael Roth, 2019/10/01
- [PATCH 45/97] ioapic: kvm: Skip route updates for masked pins, Michael Roth, 2019/10/01
- [PATCH 44/97] hw/ssi/xilinx_spips: Avoid out-of-bound access to lqspi_buf[], Michael Roth, 2019/10/01
- [PATCH 50/97] virtio-balloon: Better names for offset variables in inflate/deflate code, Michael Roth, 2019/10/01
- [PATCH 35/97] docs: recommend use of md-clear feature on all Intel CPUs, Michael Roth, 2019/10/01
- [PATCH 43/97] hw/ssi/xilinx_spips: Avoid AXI writes to the LQSPI linear memory, Michael Roth, 2019/10/01
- [PATCH 36/97] virtio-pci: fix missing device properties, Michael Roth, 2019/10/01
- [PATCH 47/97] virtio-balloon: Fix wrong sign extension of PFNs, Michael Roth, 2019/10/01