Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-06 Thread Max Reitz
On 05.02.20 20:21, Eric Blake wrote: > On 2/5/20 11:04 AM, Max Reitz wrote: >> OK, I expected users to come in a separate patch. > > I can refactor that better in v2. > >> >>> That's the use case: when copying into a destination file, it's useful >>> to know if the destination already reads as al

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-05 Thread Eric Blake
On 2/5/20 11:04 AM, Max Reitz wrote: OK, I expected users to come in a separate patch. I can refactor that better in v2. That's the use case: when copying into a destination file, it's useful to know if the destination already reads as all zeroes, before attempting a fallback to bdrv_make_z

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-05 Thread Max Reitz
On 05.02.20 16:14, Vladimir Sementsov-Ogievskiy wrote: > 05.02.2020 17:47, Vladimir Sementsov-Ogievskiy wrote: >> 05.02.2020 17:26, Eric Blake wrote: >>> On 2/5/20 3:25 AM, Vladimir Sementsov-Ogievskiy wrote: >>> > 3. For qcow2 > Hmm. Here, as I understand, than main case is freshly created

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-05 Thread Max Reitz
On 04.02.20 19:53, Eric Blake wrote: > On 2/4/20 11:32 AM, Max Reitz wrote: >> On 31.01.20 18:44, Eric Blake wrote: >>> Based-on: <20200124103458.1525982-2-david.edmond...@oracle.com> >>> ([PATCH v2 1/2] qemu-img: Add --target-is-zero to convert) >>> >>> I'm working on adding an NBD extension that

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-05 Thread Vladimir Sementsov-Ogievskiy
05.02.2020 17:47, Vladimir Sementsov-Ogievskiy wrote: 05.02.2020 17:26, Eric Blake wrote: On 2/5/20 3:25 AM, Vladimir Sementsov-Ogievskiy wrote: 3. For qcow2 Hmm. Here, as I understand, than main case is freshly created qcow2, which is fully-unallocated. To understand that it is empty, we need

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-05 Thread Vladimir Sementsov-Ogievskiy
05.02.2020 17:43, Vladimir Sementsov-Ogievskiy wrote: 05.02.2020 17:22, Eric Blake wrote: On 2/5/20 3:04 AM, Vladimir Sementsov-Ogievskiy wrote: [repo.or.cz appears to be down as I type this; I'll post a link to a repository later when it comes back up] Now up https://repo.or.cz/qemu/ericb.g

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-05 Thread Vladimir Sementsov-Ogievskiy
05.02.2020 17:26, Eric Blake wrote: On 2/5/20 3:25 AM, Vladimir Sementsov-Ogievskiy wrote: 3. For qcow2 Hmm. Here, as I understand, than main case is freshly created qcow2, which is fully-unallocated. To understand that it is empty, we need only to check all L1 entries. And for empty L1 table i

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-05 Thread Vladimir Sementsov-Ogievskiy
05.02.2020 17:22, Eric Blake wrote: On 2/5/20 3:04 AM, Vladimir Sementsov-Ogievskiy wrote: [repo.or.cz appears to be down as I type this; I'll post a link to a repository later when it comes back up] Now up https://repo.or.cz/qemu/ericb.git/shortlog/refs/tags/qcow2-all-zero-v1 I have sev

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-05 Thread Eric Blake
On 2/5/20 3:25 AM, Vladimir Sementsov-Ogievskiy wrote: 3. For qcow2 Hmm. Here, as I understand, than main case is freshly created qcow2, which is fully-unallocated. To understand that it is empty, we need only to check all L1 entries. And for empty L1 table it is fast. So we don't need any qcow2

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-05 Thread Eric Blake
On 2/5/20 3:04 AM, Vladimir Sementsov-Ogievskiy wrote: [repo.or.cz appears to be down as I type this; I'll post a link to a repository later when it comes back up] Now up https://repo.or.cz/qemu/ericb.git/shortlog/refs/tags/qcow2-all-zero-v1 I have several ideas around it. 1. For generic

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-05 Thread Vladimir Sementsov-Ogievskiy
05.02.2020 12:04, Vladimir Sementsov-Ogievskiy wrote: 31.01.2020 20:44, Eric Blake wrote: Based-on: <20200124103458.1525982-2-david.edmond...@oracle.com> ([PATCH v2 1/2] qemu-img: Add --target-is-zero to convert) I'm working on adding an NBD extension that reports whether an image is already al

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-05 Thread Vladimir Sementsov-Ogievskiy
31.01.2020 20:44, Eric Blake wrote: Based-on: <20200124103458.1525982-2-david.edmond...@oracle.com> ([PATCH v2 1/2] qemu-img: Add --target-is-zero to convert) I'm working on adding an NBD extension that reports whether an image is already all zero when the client first connects. I initially tho

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-04 Thread Eric Blake
On 2/4/20 11:32 AM, Max Reitz wrote: On 31.01.20 18:44, Eric Blake wrote: Based-on: <20200124103458.1525982-2-david.edmond...@oracle.com> ([PATCH v2 1/2] qemu-img: Add --target-is-zero to convert) I'm working on adding an NBD extension that reports whether an image is already all zero when the

Re: [PATCH 00/17] Improve qcow2 all-zero detection

2020-02-04 Thread Max Reitz
On 31.01.20 18:44, Eric Blake wrote: > Based-on: <20200124103458.1525982-2-david.edmond...@oracle.com> > ([PATCH v2 1/2] qemu-img: Add --target-is-zero to convert) > > I'm working on adding an NBD extension that reports whether an image > is already all zero when the client first connects. I init

[PATCH 00/17] Improve qcow2 all-zero detection

2020-01-31 Thread Eric Blake
Based-on: <20200124103458.1525982-2-david.edmond...@oracle.com> ([PATCH v2 1/2] qemu-img: Add --target-is-zero to convert) I'm working on adding an NBD extension that reports whether an image is already all zero when the client first connects. I initially thought I could write the NBD code to jus