From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZveQL-00082R-9S for qemu-devel@nongnu.org; Sun, 08 Nov 2015 23:51:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZveQK-00052O-8R for qemu-devel@nongnu.org; Sun, 08 Nov 2015 23:51:21 -0500 References: <1446455617-129562-1-git-send-email-guangrong.xiao@linux.intel.com> <1446455617-129562-12-git-send-email-guangrong.xiao@linux.intel.com> <20151106155017.GX4180@thinpad.lan.raisama.net> From: Xiao Guangrong Message-ID: <564024C7.1050108@linux.intel.com> Date: Mon, 9 Nov 2015 12:44:55 +0800 MIME-Version: 1.0 In-Reply-To: <20151106155017.GX4180@thinpad.lan.raisama.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Kevin Wolf , vsementsov@virtuozzo.com, qemu-block@nongnu.org, kvm@vger.kernel.org, mst@redhat.com, gleb@kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, imammedo@redhat.com, pbonzini@redhat.com, dan.j.williams@intel.com, rth@twiddle.net On 11/06/2015 11:50 PM, Eduardo Habkost wrote: > As this patch affects raw_getlength(), CCing the raw block driver > maintainer and the qemu-block mailing list. Eduardo, thanks for your reminder. I will keep CCing Kevin and qemu-block mail list for future version. > > On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: >> It is used to get the size of the specified file, also qemu_fd_getlength() >> is introduced to unify the code with raw_getlength() in block/raw-posix.c >> >> Signed-off-by: Xiao Guangrong >> --- >> block/raw-posix.c | 7 +------ >> include/qemu/osdep.h | 2 ++ >> util/osdep.c | 31 +++++++++++++++++++++++++++++++ > > I know I was the one who suggested osdep.c, but maybe oslib-posix.c is a > more appropriate place for the new function? > Since the function we introduced here can work on both windows and posix, so i thing osdep.c is the right place. Otherwise we should implement it for multiple platforms.