qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes
Date: Fri, 12 Mar 2021 21:45:42 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

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->open_flags & BDRV_O_NOCACHE)) {

Looks a bit like a layering violation, but I have no better proposal and you 
gave your reasoning, so, OK.

Probably better is check request_alignment of bs->file->bs. If it > 1 then 
enable the cache.

--
Best regards,
Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]