From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fH1P4-0008Qg-Bp for qemu-devel@nongnu.org; Fri, 11 May 2018 02:19:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fH1P3-0000gD-Jc for qemu-devel@nongnu.org; Fri, 11 May 2018 02:19:42 -0400 Date: Fri, 11 May 2018 14:19:32 +0800 From: Fam Zheng Message-ID: <20180511061932.GA28054@lemon.usersys.redhat.com> References: <20180509145815.3330-1-famz@redhat.com> <20180509145815.3330-3-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v3 2/9] raw: Implement copy offloading List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, Kevin Wolf , Stefan Hajnoczi , qemu-block@nongnu.org, Peter Lieven , Max Reitz , Ronnie Sahlberg , Paolo Bonzini On Wed, 05/09 10:17, Eric Blake wrote: > On 05/09/2018 09:58 AM, Fam Zheng wrote: > > Just pass down to ->file. > > > > Signed-off-by: Fam Zheng > > Reviewed-by: Stefan Hajnoczi > > --- > > block/raw-format.c | 20 ++++++++++++++++++++ > > 1 file changed, 20 insertions(+) > > > > diff --git a/block/raw-format.c b/block/raw-format.c > > index a378547c99..febddf00c0 100644 > > --- a/block/raw-format.c > > +++ b/block/raw-format.c > > @@ -482,6 +482,24 @@ static int raw_probe_geometry(BlockDriverState *bs, HDGeometry *geo) > > return bdrv_probe_geometry(bs->file->bs, geo); > > } > > +static int coroutine_fn raw_co_copy_range_from(BlockDriverState *bs, > > + BdrvChild *src, uint64_t src_offset, > > + BdrvChild *dst, uint64_t dst_offset, > > + uint64_t bytes, BdrvRequestFlags flags) > > +{ > > + return bdrv_co_copy_range_from(bs->file, src_offset, dst, dst_offset, > > + bytes, flags); > > Bug - this fails to take into account s->offset, which occurs when opening a > raw format protocol over a subset of the overall format protocol. Good catch. I'll fix it in v4. Thanks. Fam