On 12/15/2017 06:53 AM, Alberto Garcia wrote: > Similar to offset_to_l2_index(), this function returns the index in > the L1 table for a given guest offset. This is only used in a couple > of places and it's not a particularly complex calculation, but it > makes the code a bit more readable. > > Although in the qcow2_get_cluster_offset() case the old code was > taking advantage of the l1_bits variable, we're going to get rid of > the other uses of l1_bits in a later patch anyway, so it doesn't make > sense to keep it just for this. > > Signed-off-by: Alberto Garcia <[email protected]> > --- > block/qcow2-cluster.c | 4 ++-- > block/qcow2.h | 5 +++++ > 2 files changed, 7 insertions(+), 2 deletions(-) >
Reviewed-by: Eric Blake <[email protected]> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
