Re: [PATCH v3 2/2] qcow2: Skip copy-on-write when allocating a zero cluster

2020-09-11 Thread Vladimir Sementsov-Ogievskiy
11.09.2020 13:04, Alberto Garcia wrote: On Fri 11 Sep 2020 11:34:37 AM CEST, Vladimir Sementsov-Ogievskiy wrote: -if (!is_zero_cow(bs, m)) { +ret = is_zero_cow(bs, m); +if (ret < 0) { +return ret; It's a common practice to treat block-status errors as "unkno

Re: [PATCH v3 2/2] qcow2: Skip copy-on-write when allocating a zero cluster

2020-09-11 Thread Alberto Garcia
On Fri 11 Sep 2020 11:34:37 AM CEST, Vladimir Sementsov-Ogievskiy wrote: >> -if (!is_zero_cow(bs, m)) { >> +ret = is_zero_cow(bs, m); >> +if (ret < 0) { >> +return ret; > > It's a common practice to treat block-status errors as "unknown" > status and not error-ou

Re: [PATCH v3 2/2] qcow2: Skip copy-on-write when allocating a zero cluster

2020-09-11 Thread Vladimir Sementsov-Ogievskiy
10.09.2020 20:46, Alberto Garcia wrote: Since commit c8bb23cbdbe32f5c326365e0a82e1b0e68cdcd8a when a write request results in a new allocation QEMU first tries to see if the rest of the cluster outside the written area contains only zeroes. In that case, instead of doing a normal copy-on-write o

[PATCH v3 2/2] qcow2: Skip copy-on-write when allocating a zero cluster

2020-09-10 Thread Alberto Garcia
Since commit c8bb23cbdbe32f5c326365e0a82e1b0e68cdcd8a when a write request results in a new allocation QEMU first tries to see if the rest of the cluster outside the written area contains only zeroes. In that case, instead of doing a normal copy-on-write operation and writing explicit zero buffers