qemu-img: find the image end offset during check