|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | Re: [PATCH v3 1/5] block-copy: streamline choice of copy_range vs. read/write |
Date: | Wed, 9 Jun 2021 13:54:24 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |