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