Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-29 Thread Vladimir Sementsov-Ogievskiy
12.03.2021 21:15, Max Reitz wrote: On 05.03.21 18:35, Vladimir Sementsov-Ogievskiy wrote: Compressed writes are unaligned to 512, which works very slow in O_DIRECT mode. Let's use the cache. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   block/coroutines.h |   3 +   block/qcow2.h   

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-17 Thread Max Reitz
On 16.03.21 18:48, Vladimir Sementsov-Ogievskiy wrote: 16.03.2021 15:25, Max Reitz wrote: On 15.03.21 15:40, Vladimir Sementsov-Ogievskiy wrote: 15.03.2021 12:58, Max Reitz wrote: [...] The question is whether it really makes sense to even have a seqcache_read() path when in reality it’s pr

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-16 Thread Vladimir Sementsov-Ogievskiy
16.03.2021 15:25, Max Reitz wrote: On 15.03.21 15:40, Vladimir Sementsov-Ogievskiy wrote: 15.03.2021 12:58, Max Reitz wrote: [...] The question is whether it really makes sense to even have a seqcache_read() path when in reality it’s probably never accessed.  I mean, besides the fact that

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-16 Thread Max Reitz
On 15.03.21 15:40, Vladimir Sementsov-Ogievskiy wrote: 15.03.2021 12:58, Max Reitz wrote: [...] The question is whether it really makes sense to even have a seqcache_read() path when in reality it’s probably never accessed.  I mean, besides the fact that it seems based purely on chance wheth

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-15 Thread Vladimir Sementsov-Ogievskiy
15.03.2021 12:58, Max Reitz wrote: On 12.03.21 19:43, Vladimir Sementsov-Ogievskiy wrote: 12.03.2021 21:15, Max Reitz wrote: On 05.03.21 18:35, Vladimir Sementsov-Ogievskiy wrote: Compressed writes are unaligned to 512, which works very slow in O_DIRECT mode. Let's use the cache. Signed-off-b

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-15 Thread Max Reitz
On 12.03.21 19:43, Vladimir Sementsov-Ogievskiy wrote: 12.03.2021 21:15, Max Reitz wrote: On 05.03.21 18:35, Vladimir Sementsov-Ogievskiy wrote: Compressed writes are unaligned to 512, which works very slow in O_DIRECT mode. Let's use the cache. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-12 Thread Max Reitz
On 05.03.21 18:35, Vladimir Sementsov-Ogievskiy wrote: Compressed writes are unaligned to 512, which works very slow in O_DIRECT mode. Let's use the cache. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/coroutines.h | 3 + block/qcow2.h | 4 ++ block/qcow2-refcount.c

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-12 Thread Vladimir Sementsov-Ogievskiy
12.03.2021 21:15, Max Reitz wrote: @@ -1834,6 +1835,10 @@ static int coroutine_fn qcow2_do_open(BlockDriverState *bs, QDict *options,   s->inflight_writes_counters =   g_hash_table_new_full(g_int64_hash, g_int64_equal, g_free, g_free); +    if (!has_data_file(bs) && (bs->file->bs->op

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-12 Thread Vladimir Sementsov-Ogievskiy
12.03.2021 21:15, Max Reitz wrote: On 05.03.21 18:35, Vladimir Sementsov-Ogievskiy wrote: Compressed writes are unaligned to 512, which works very slow in O_DIRECT mode. Let's use the cache. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   block/coroutines.h |   3 +   block/qcow2.h   

[PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-05 Thread Vladimir Sementsov-Ogievskiy
Compressed writes are unaligned to 512, which works very slow in O_DIRECT mode. Let's use the cache. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/coroutines.h | 3 + block/qcow2.h | 4 ++ block/qcow2-refcount.c | 10 +++ block/qcow2.c | 158 +++