Re: [Qemu-block] [PATCH v2] qemu-img: check block status of backing file
From:
Ren Kimura
Subject:
Re: [Qemu-block] [PATCH v2] qemu-img: check block status of backing file when converting.
Date:
Sun, 17 Apr 2016 13:19:39 +0900
> So the correct way to test this would be:
> if (!(ret & BDRV_BLOCK_DATA) && !(ret & BDRV_BLOCK_ZERO)) > Or, shorter: > if (!(ret & (BDRV_BLOCK_DATA | BDRV_BLOCK_ZERO)))
Oops! It's very trivial mistake. I'll fix it.
> I originally said (in my reply to v1) that we may not fall through to > the backing file if the range is allocated in the overlay. That is > correct, but now it turns out that we can also skip falling through if > the range is not allocated in the overlay but the contents of the > backing file don't matter anyway.
Aha. It's totally true. But I'd like to keep these operations simple and easy to read.