diff mbox

[FIX,V2] block: Fix device snapshots broken by the block filter snapshots patchset.

Message ID 1392256297-21782-2-git-send-email-benoit.canet@irqsave.net
State New
Headers show

Commit Message

Benoît Canet Feb. 13, 2014, 1:51 a.m. UTC
Signed-off-by: Benoit Canet <benoit@irqsave.net>
---
 block.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Kevin Wolf Feb. 13, 2014, 8:33 a.m. UTC | #1
Am 13.02.2014 um 02:51 hat Benoît Canet geschrieben:
> Signed-off-by: Benoit Canet <benoit@irqsave.net>
> ---
>  block.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Should be [PATCH v3] in the subject line.

> diff --git a/block.c b/block.c
> index 70d7f35..d9553ba 100644
> --- a/block.c
> +++ b/block.c
> @@ -5419,11 +5419,7 @@ bool bdrv_is_first_non_filter(BlockDriverState *candidate)
>      QTAILQ_FOREACH(bs, &bdrv_states, device_list) {
>          bool perm;
>  
> -        if (!bs->file) {
> -            continue;
> -        }
> -
> -        perm = bdrv_recurse_is_first_non_filter(bs->file, candidate);
> +        perm = bdrv_recurse_is_first_non_filter(bs, candidate);
>  
>          /* candidate is the first non filter */
>          if (perm) {

So we're back to my patch, just with different author? I thought you
said something was broken with it?

Kevin
Benoît Canet Feb. 13, 2014, 8:44 a.m. UTC | #2
The Thursday 13 Feb 2014 à 09:33:52 (+0100), Kevin Wolf wrote :
> Am 13.02.2014 um 02:51 hat Benoît Canet geschrieben:
> > Signed-off-by: Benoit Canet <benoit@irqsave.net>
> > ---
> >  block.c | 6 +-----
> >  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> Should be [PATCH v3] in the subject line.
> 
> > diff --git a/block.c b/block.c
> > index 70d7f35..d9553ba 100644
> > --- a/block.c
> > +++ b/block.c
> > @@ -5419,11 +5419,7 @@ bool bdrv_is_first_non_filter(BlockDriverState *candidate)
> >      QTAILQ_FOREACH(bs, &bdrv_states, device_list) {
> >          bool perm;
> >  
> > -        if (!bs->file) {
> > -            continue;
> > -        }
> > -
> > -        perm = bdrv_recurse_is_first_non_filter(bs->file, candidate);
> > +        perm = bdrv_recurse_is_first_non_filter(bs, candidate);
> >  
> >          /* candidate is the first non filter */
> >          if (perm) {
> 
> So we're back to my patch, just with different author? I thought you
> said something was broken with it?

Yes it's your patch.

My quorum command line had extra "file." in front of the quorum parameters.
(the user error you mentioned)
That's the reason I initially broke snapshot's because I was testing against
something like bs->file thinking it was normal to get top bs in bs->file.
And that's also the reason why I though your patch was broken.

The quorum series also need a repost to get rid of the "file." of the commit
comment.

Best regards

Benoît

> 
> Kevin
>
diff mbox

Patch

diff --git a/block.c b/block.c
index 70d7f35..d9553ba 100644
--- a/block.c
+++ b/block.c
@@ -5419,11 +5419,7 @@  bool bdrv_is_first_non_filter(BlockDriverState *candidate)
     QTAILQ_FOREACH(bs, &bdrv_states, device_list) {
         bool perm;
 
-        if (!bs->file) {
-            continue;
-        }
-
-        perm = bdrv_recurse_is_first_non_filter(bs->file, candidate);
+        perm = bdrv_recurse_is_first_non_filter(bs, candidate);
 
         /* candidate is the first non filter */
         if (perm) {