Re: [PATCH] qcow2: Reduce write_zeroes size in handle_alloc_space()

2020-06-10 Thread Kevin Wolf
Am 10.06.2020 um 08:50 hat Vladimir Sementsov-Ogievskiy geschrieben: > 09.06.2020 19:19, Eric Blake wrote: > > On 6/9/20 10:18 AM, Kevin Wolf wrote: > > > > > > > > -        ret = bdrv_co_pwrite_zeroes(s->data_file, > > > > > > m->alloc_offset, > > > > > > -                

Re: [PATCH] qcow2: Reduce write_zeroes size in handle_alloc_space()

2020-06-10 Thread Vladimir Sementsov-Ogievskiy
09.06.2020 18:29, Vladimir Sementsov-Ogievskiy wrote: 09.06.2020 18:18, Kevin Wolf wrote: Am 09.06.2020 um 16:46 hat Eric Blake geschrieben: On 6/9/20 9:28 AM, Vladimir Sementsov-Ogievskiy wrote: 09.06.2020 17:08, Kevin Wolf wrote: Since commit c8bb23cbdbe, handle_alloc_space() is called for

Re: [PATCH] qcow2: Reduce write_zeroes size in handle_alloc_space()

2020-06-09 Thread Vladimir Sementsov-Ogievskiy
09.06.2020 19:19, Eric Blake wrote: On 6/9/20 10:18 AM, Kevin Wolf wrote: -    ret = bdrv_co_pwrite_zeroes(s->data_file, m->alloc_offset, -    m->nb_clusters * s->cluster_size, +    ret = bdrv_co_pwrite_zeroes(s->data_file, start, len,    

Re: [PATCH] qcow2: Reduce write_zeroes size in handle_alloc_space()

2020-06-09 Thread Eric Blake
On 6/9/20 10:18 AM, Kevin Wolf wrote: -    ret = bdrv_co_pwrite_zeroes(s->data_file, m->alloc_offset, -    m->nb_clusters * s->cluster_size, +    ret = bdrv_co_pwrite_zeroes(s->data_file, start, len,   BDRV_REQ_NO_FALLB

Re: [PATCH] qcow2: Reduce write_zeroes size in handle_alloc_space()

2020-06-09 Thread Vladimir Sementsov-Ogievskiy
09.06.2020 18:18, Kevin Wolf wrote: Am 09.06.2020 um 16:46 hat Eric Blake geschrieben: On 6/9/20 9:28 AM, Vladimir Sementsov-Ogievskiy wrote: 09.06.2020 17:08, Kevin Wolf wrote: Since commit c8bb23cbdbe, handle_alloc_space() is called for newly allocated clusters to efficiently initialise the

Re: [PATCH] qcow2: Reduce write_zeroes size in handle_alloc_space()

2020-06-09 Thread Kevin Wolf
Am 09.06.2020 um 16:46 hat Eric Blake geschrieben: > On 6/9/20 9:28 AM, Vladimir Sementsov-Ogievskiy wrote: > > 09.06.2020 17:08, Kevin Wolf wrote: > > > Since commit c8bb23cbdbe, handle_alloc_space() is called for newly > > > allocated clusters to efficiently initialise the COW areas with zeros if

Re: [PATCH] qcow2: Reduce write_zeroes size in handle_alloc_space()

2020-06-09 Thread Eric Blake
On 6/9/20 9:28 AM, Vladimir Sementsov-Ogievskiy wrote: 09.06.2020 17:08, Kevin Wolf wrote: Since commit c8bb23cbdbe, handle_alloc_space() is called for newly allocated clusters to efficiently initialise the COW areas with zeros if necessary. It skips the whole operation if both start_cow nor end

Re: [PATCH] qcow2: Reduce write_zeroes size in handle_alloc_space()

2020-06-09 Thread Eric Blake
On 6/9/20 9:08 AM, Kevin Wolf wrote: Since commit c8bb23cbdbe, handle_alloc_space() is called for newly allocated clusters to efficiently initialise the COW areas with zeros if necessary. It skips the whole operation if both start_cow nor end_cow s/nor/and/ are empty. However, it requests zer

Re: [PATCH] qcow2: Reduce write_zeroes size in handle_alloc_space()

2020-06-09 Thread Vladimir Sementsov-Ogievskiy
09.06.2020 17:08, Kevin Wolf wrote: Since commit c8bb23cbdbe, handle_alloc_space() is called for newly allocated clusters to efficiently initialise the COW areas with zeros if necessary. It skips the whole operation if both start_cow nor end_cow are empty. However, it requests zeroing the whole r