qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V2 4/7] qed: add bdrv_invalidate_cache to be cal


From: Benoît Canet
Subject: Re: [Qemu-devel] [PATCH V2 4/7] qed: add bdrv_invalidate_cache to be called after incoming live migration
Date: Thu, 22 Mar 2012 15:15:01 +0100


>It's not clear to me why we need to introduce this field to stash
>flags values.  bs->open_flags already has this information.

>Originally this was introduced in 06d9260ffa9 ("qcow2: implement
>bdrv_invalidate_cache (v2)") for qcow2.  I wonder if that field is
>necessary when we already have bs->open_flags.

>What I don't like about s->flags is that it duplicates state *and*
>it's done in each block driver that supports .bdrv_invalidate_cache().
> So I wonder if we can drop it?

I added this flag after seeing the following code in in bdrv_open_common.

    /*
     * Clear flags that are internal to the block layer before opening the
     * image.
     */
    open_flags = flags & ~(BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING);

This lead me to believe that  bs->open_flags != open_flags.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]