On Fri 21 Feb 2020 03:57:27 PM CET, Max Reitz wrote:
> As noted in v2, this function is only called when downgrading qcow2
> images to v2. It kind of made sense to just call set_l2_bitmap() in
> v2, but now with the if () conditional... I suppose it may make more
> sense to assert that the image does not have subclusters at the
> beginning of the function and be done with it.
Hmmm, you're right.
> OTOH, well, this does make ensuring that we have subcluster “support”
> everywhere a bit easier because this way all set_l2_entry() calls are
> accompanied by an “if (subclusters) { set_l2_bitmap() }” part.
Another alternative is to assert that the image does not have subcluster
but still leave a comment after both set_l2_entry() calls explaining why
there's no need to touch the bitmap.
I think I'll do that, unless you have a different proposal.
Berto