qemu-devel
[Top][All Lists]
Advanced

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

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


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v3 2/2] qcow2: Skip copy-on-write when allocating a zero cluster
Date: Fri, 11 Sep 2020 14:06:04 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

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 "unknown"
status and not error-out immediately:

   - really, it's not critical, we can continue assuming non-zero
   - if there are real problems with IO, we'll most probably fail on
   real read or write operation, and report its status, which seems
   better for user than block-status error

But what's the problem exactly, does this complicate the code too much?
:-?

Of course not :) Hmm. OK, I don't know, I'm just used to this practice in block 
jobs. Patch is correct as is:
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


So, I'd keep existing logic in handle_alloc_space(). And, if you agree
and resend, probably good to split this patch into two, one for
block.h/io.c and one for qcow2.c (still, I'm OK with it as one patch).

Sure, I can split the patch if I have to resend it.

Berto



--
Best regards,
Vladimir



reply via email to

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