09.06.2021 12:33, Paolo Bonzini wrote:
On 09/06/21 10:51, Vladimir Sementsov-Ogievskiy wrote:

+    default:
[...]
+        bounce_buffer = qemu_blockalign(s->source->bs, nbytes);
+        ret = bdrv_co_pread(s->source, offset, nbytes, bounce_buffer, 0);
+        if (ret < 0) {
+            trace_block_copy_read_fail(s, offset, ret);
+            *error_is_read = true;
+            goto out;
+        }
+        ret = bdrv_co_pwrite(s->target, offset, nbytes, bounce_buffer,
+                            s->write_flags);
+        if (ret < 0) {
+            trace_block_copy_write_fail(s, offset, ret);
+            *error_is_read = false;
+            goto out;
+        }
+out:
+        qemu_vfree(bounce_buffer);

label inside switch operator? Rather unusual. Please, let's avoid it and just 
keep out: after switch operator.

Agreed with all comments except this one, the bounce_buffer doesn't exist in 
the other cases.

If keep it as is, worth making indentation for out: the same as for default: ?

--
Best regards,
Vladimir

Reply via email to