* [Qemu-devel] [PATCH] block: Fix device snapshots broken by the block filter snapshots patchset.
@ 2014-02-10 20:25 Benoît Canet
0 siblings, 0 replies; only message in thread
From: Benoît Canet @ 2014-02-10 20:25 UTC (permalink / raw)
To: qemu-devel
Cc: kwolf, Benoît Canet, famz, Benoit Canet, jcody, armbru,
mreitz, stefanha
Take into account the fact that a block filter like quorum will be in bs->file
while a regular block driver device is really on the top level.
Signed-off-by: Benoit Canet <benoit@irqsave.net>
---
block.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/block.c b/block.c
index 07ac50a..6ace45c 100644
--- a/block.c
+++ b/block.c
@@ -5402,12 +5402,14 @@ bool bdrv_is_first_non_filter(BlockDriverState *candidate)
QTAILQ_FOREACH(bs, &bdrv_states, device_list) {
bool perm;
- if (!bs->file) {
- continue;
+ if (bs->file &&
+ bs->file->drv &&
+ bs->file->drv->authorizations[BS_IS_A_FILTER]) {
+ perm = bdrv_recurse_is_first_non_filter(bs->file, candidate);
+ } else {
+ perm = bdrv_recurse_is_first_non_filter(bs, candidate);
}
- perm = bdrv_recurse_is_first_non_filter(bs->file, candidate);
-
/* candidate is the first non filter */
if (perm) {
return true;
--
1.8.3.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-02-10 20:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 20:25 [Qemu-devel] [PATCH] block: Fix device snapshots broken by the block filter snapshots patchset Benoît Canet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).