On Sat, Dec 31, 2011 at 9:06 AM, Dong Xu Wang <wdon...@linux.vnet.ibm.com> wrote: > +static int bdrv_qed_is_dirty(BlockDriverState *bs) > +{ > + BDRVQEDState *s = bs->opaque; > + return s->header.features & QED_F_NEED_CHECK; > +}
Looks good. Note that the image will be checked and then QED_F_NEED_CHECK is cleared when the image is opened for read/write. So the flag is only reported if the image was opened read-only, or if we're writing to the image and it allocated new clusters recently. Stefan