* [PULL 0/1] xen queue 2021-03-23
@ 2021-03-23 12:04 Anthony PERARD via
2021-03-23 12:04 ` [PULL 1/1] xen-block: Fix removal of backend instance via xenstore Anthony PERARD via
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Anthony PERARD via @ 2021-03-23 12:04 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Anthony PERARD
The following changes since commit 5ca634afcf83215a9a54ca6e66032325b5ffb5f6:
Merge remote-tracking branch 'remotes/philmd/tags/sdmmc-20210322' into staging (2021-03-22 18:50:25 +0000)
are available in the Git repository at:
https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20210323
for you to fetch changes up to b807ca3fa0ca29ec015adcf4045e716337cd3635:
xen-block: Fix removal of backend instance via xenstore (2021-03-23 11:18:20 +0000)
----------------------------------------------------------------
Xen patch
- Fix Xen backend block detach via xenstore.
----------------------------------------------------------------
Anthony PERARD (1):
xen-block: Fix removal of backend instance via xenstore
hw/block/xen-block.c | 9 +++++++++
1 file changed, 9 insertions(+)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PULL 1/1] xen-block: Fix removal of backend instance via xenstore
2021-03-23 12:04 [PULL 0/1] xen queue 2021-03-23 Anthony PERARD via
@ 2021-03-23 12:04 ` Anthony PERARD via
2021-03-23 12:09 ` [PULL 0/1] xen queue 2021-03-23 no-reply
2021-03-23 21:14 ` Peter Maydell
2 siblings, 0 replies; 5+ messages in thread
From: Anthony PERARD via @ 2021-03-23 12:04 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Anthony PERARD
Whenever a Xen block device is detach via xenstore, the image
associated with it remained open by the backend QEMU and an error is
logged:
qemu-system-i386: failed to destroy drive: Node xvdz-qcow2 is in use
This happened since object_unparent() doesn't immediately frees the
object and thus keep a reference to the node we are trying to free.
The reference is hold by the "drive" property and the call
xen_block_drive_destroy() fails.
In order to fix that, we call drain_call_rcu() to run the callback
setup by bus_remove_child() via object_unparent().
Fixes: 2d24a6466154 ("device-core: use RCU for list of children of a bus")
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Message-Id: <20210308143232.83388-1-anthony.perard@citrix.com>
---
hw/block/xen-block.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index ac82d5406337..83754a434481 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -972,6 +972,15 @@ static void xen_block_device_destroy(XenBackendInstance *backend,
object_unparent(OBJECT(xendev));
+ /*
+ * Drain all pending RCU callbacks as object_unparent() frees `xendev'
+ * in a RCU callback.
+ * And due to the property "drive" still existing in `xendev', we
+ * can't destroy the XenBlockDrive associated with `xendev' with
+ * xen_block_drive_destroy() below.
+ */
+ drain_call_rcu();
+
if (iothread) {
xen_block_iothread_destroy(iothread, errp);
if (*errp) {
--
Anthony PERARD
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PULL 0/1] xen queue 2021-03-23
2021-03-23 12:04 [PULL 0/1] xen queue 2021-03-23 Anthony PERARD via
2021-03-23 12:04 ` [PULL 1/1] xen-block: Fix removal of backend instance via xenstore Anthony PERARD via
@ 2021-03-23 12:09 ` no-reply
2021-03-23 13:56 ` Anthony PERARD via
2021-03-23 21:14 ` Peter Maydell
2 siblings, 1 reply; 5+ messages in thread
From: no-reply @ 2021-03-23 12:09 UTC (permalink / raw)
To: qemu-devel; +Cc: anthony.perard, peter.maydell, qemu-devel
Patchew URL: https://patchew.org/QEMU/20210323120439.563855-1-anthony.perard@citrix.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Type: series
Message-id: 20210323120439.563855-1-anthony.perard@citrix.com
Subject: [PULL 0/1] xen queue 2021-03-23
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/20210323120439.563855-1-anthony.perard@citrix.com -> patchew/20210323120439.563855-1-anthony.perard@citrix.com
Switched to a new branch 'test'
9752a37 xen-block: Fix removal of backend instance via xenstore
=== OUTPUT BEGIN ===
ERROR: Author email address is mangled by the mailing list
#2:
Author: Anthony PERARD via <qemu-devel@nongnu.org>
total: 1 errors, 0 warnings, 15 lines checked
Commit 9752a379e990 (xen-block: Fix removal of backend instance via xenstore) has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/20210323120439.563855-1-anthony.perard@citrix.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PULL 0/1] xen queue 2021-03-23
2021-03-23 12:09 ` [PULL 0/1] xen queue 2021-03-23 no-reply
@ 2021-03-23 13:56 ` Anthony PERARD via
0 siblings, 0 replies; 5+ messages in thread
From: Anthony PERARD via @ 2021-03-23 13:56 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell
On Tue, Mar 23, 2021 at 05:09:45AM -0700, no-reply@patchew.org wrote:
> ERROR: Author email address is mangled by the mailing list
> #2:
> Author: Anthony PERARD via <qemu-devel@nongnu.org>
The actual commit in the pull request is fine.
I didn't work around the email issue when sending pull request, but I've
worked around it when sending patch series.
Cheers,
--
Anthony PERARD
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PULL 0/1] xen queue 2021-03-23
2021-03-23 12:04 [PULL 0/1] xen queue 2021-03-23 Anthony PERARD via
2021-03-23 12:04 ` [PULL 1/1] xen-block: Fix removal of backend instance via xenstore Anthony PERARD via
2021-03-23 12:09 ` [PULL 0/1] xen queue 2021-03-23 no-reply
@ 2021-03-23 21:14 ` Peter Maydell
2 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2021-03-23 21:14 UTC (permalink / raw)
To: Anthony PERARD; +Cc: QEMU Developers
On Tue, 23 Mar 2021 at 12:04, Anthony PERARD <anthony.perard@citrix.com> wrote:
>
> The following changes since commit 5ca634afcf83215a9a54ca6e66032325b5ffb5f6:
>
> Merge remote-tracking branch 'remotes/philmd/tags/sdmmc-20210322' into staging (2021-03-22 18:50:25 +0000)
>
> are available in the Git repository at:
>
> https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20210323
>
> for you to fetch changes up to b807ca3fa0ca29ec015adcf4045e716337cd3635:
>
> xen-block: Fix removal of backend instance via xenstore (2021-03-23 11:18:20 +0000)
>
> ----------------------------------------------------------------
> Xen patch
>
> - Fix Xen backend block detach via xenstore.
>
> ----------------------------------------------------------------
> Anthony PERARD (1):
> xen-block: Fix removal of backend instance via xenstore
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/6.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-23 21:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 12:04 [PULL 0/1] xen queue 2021-03-23 Anthony PERARD via
2021-03-23 12:04 ` [PULL 1/1] xen-block: Fix removal of backend instance via xenstore Anthony PERARD via
2021-03-23 12:09 ` [PULL 0/1] xen queue 2021-03-23 no-reply
2021-03-23 13:56 ` Anthony PERARD via
2021-03-23 21:14 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.