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 <vsement...@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