Am 21.01.2013 17:09, schrieb Paolo Bonzini: > The new testcase did not find Kevin's bug (which is actually not > there), but I still did the change he asked to the logic; it is > clearer that way. > > And the testcase *did* find a related problem. Here is the relevant > diff from v2: > > if (backing_filename[0] && !s->target->backing_hd) { > bdrv_get_info(s->target, &bdi); > - if (s->buf_size < bdi.cluster_size) { > - s->buf_size = bdi.cluster_size; > + if (s->granularity < bdi.cluster_size) { > + s->buf_size = MAX(s->buf_size, bdi.cluster_size); > s->cow_bitmap = bitmap_new(length); > } > } > > In deciding whether to do COW, the cluster size was tested against the > wrong value. > > Following Kevin's suggestion, I also renamed all variables dealing > with dirty-bitmap-granularity-sized blocks to call them "chunks", not > "clusters". This makes the interdiff quite large, but there are no > semantic changes other than the movement of bitmap_set(s->cow_bitmap) > and the bugfix. > > Patches 1-4 are identical. For the others, see the individual patches.
Thanks, applied patches 1-8 to the block branch. I think patches 9 and 10 need a respin, see the comments there. Kevin