[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v4 15/23] qemu-img: Add find_nonzer
From: |
John Snow |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v4 15/23] qemu-img: Add find_nonzero() |
Date: |
Wed, 27 Sep 2017 17:16:09 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/13/2017 12:03 PM, Eric Blake wrote:
> During 'qemu-img compare', when we are checking that an allocated
> portion of one file is all zeros, we don't need to waste time
> computing how many additional sectors after the first non-zero
> byte are also non-zero. Create a new helper find_nonzero() to do
> the check for a first non-zero sector, and rebase
> check_empty_sectors() to use it.
>
> The new interface intentionally uses bytes in its interface, even
> though it still crawls the buffer a sector at a time; it is robust
> to a partial sector at the end of the buffer.
>
> Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: John Snow <address@hidden>
- [Qemu-block] [PATCH v4 13/23] qemu-img: Simplify logic in img_compare(), (continued)
- [Qemu-block] [PATCH v4 15/23] qemu-img: Add find_nonzero(), Eric Blake, 2017/09/13
- Re: [Qemu-block] [Qemu-devel] [PATCH v4 15/23] qemu-img: Add find_nonzero(),
John Snow <=
- [Qemu-block] [PATCH v4 16/23] qemu-img: Drop redundant error message in compare, Eric Blake, 2017/09/13
- [Qemu-block] [PATCH v4 19/23] qemu-img: Change img_rebase() to be byte-based, Eric Blake, 2017/09/13
- [Qemu-block] [PATCH v4 18/23] qemu-img: Change compare_sectors() to be byte-based, Eric Blake, 2017/09/13
- [Qemu-block] [PATCH v4 17/23] qemu-img: Change check_empty_sectors() to byte-based, Eric Blake, 2017/09/13
- [Qemu-block] [PATCH v4 20/23] qemu-img: Change img_compare() to be byte-based, Eric Blake, 2017/09/13