From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5CWx-00077p-BA for qemu-devel@nongnu.org; Wed, 17 Jun 2015 08:33:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5CWs-00012D-5v for qemu-devel@nongnu.org; Wed, 17 Jun 2015 08:33:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5CWs-000121-0H for qemu-devel@nongnu.org; Wed, 17 Jun 2015 08:33:18 -0400 Date: Wed, 17 Jun 2015 13:33:12 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20150617123312.GJ2122@work-vm> References: <1434450415-11339-1-git-send-email-dgilbert@redhat.com> <1434450415-11339-6-git-send-email-dgilbert@redhat.com> <87h9q65yyn.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h9q65yyn.fsf@neno.neno> Subject: Re: [Qemu-devel] [PATCH v7 05/42] Add qemu_get_buffer_less_copy to avoid copies some of the time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, liang.z.li@intel.com, qemu-devel@nongnu.org, luis@cs.umu.se, amit.shah@redhat.com, pbonzini@redhat.com, david@gibson.dropbear.id.au * Juan Quintela (quintela@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" wrote: > > From: "Dr. David Alan Gilbert" > > > > qemu_get_buffer always copies the data it reads to a users buffer, > > however in many cases the file buffer inside qemu_file could be given > > back to the caller, avoiding the copy. This isn't always possible > > depending on the size and alignment of the data. > > > > Thus 'qemu_get_buffer_less_copy' either copies the data to a supplied > > buffer or updates a pointer to the internal buffer if convenient. > > > > Signed-off-by: Dr. David Alan Gilbert > > Reviewed-by: Juan Quintela > > I don't know still where this function is used, but function is correct. > > Can I suggest to change th ename to: > > qemu_get_buffer_in_place()? > > less_copy sounds ambigous to me :p Changed. Dave -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK