From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsMHX-00083X-16 for qemu-devel@nongnu.org; Thu, 06 Oct 2016 23:57:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsMHV-0005A0-VE for qemu-devel@nongnu.org; Thu, 06 Oct 2016 23:57:11 -0400 Date: Thu, 6 Oct 2016 23:57:01 -0400 From: Jeff Cody Message-ID: <20161007035701.GA5746@localhost.localdomain> References: <1457373855-8072-1-git-send-email-ndevos@redhat.com> <56DDD31A.8060707@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block/gluster: add support for SEEK_DATA/SEEK_HOLE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Niels de Vos , qemu-block@nongnu.org, "qemu-devel@nongnu.org" , Prasanna Kumar Kalever On Thu, Oct 06, 2016 at 05:09:59PM -0500, Eric Blake wrote: > On 03/07/2016 01:14 PM, Eric Blake wrote: > > [adding qemu-devel; ALL patches must cc qemu-devel even when sent to > > another list] > >=20 > > On 03/07/2016 11:04 AM, Niels de Vos wrote: > >> GlusterFS 3.8 contains support for SEEK_DATA and SEEK_HOLE. This mak= es > >> it possible to detect sparse areas in files. > >> > >> Signed-off-by: Niels de Vos > >> > >> -- > >> Tested by compiling and running "qemu-img map gluster://..." with a > >> build of the current master branch of glusterfs. Using a Fedora > >> cloud image (in raw format) shows many SEEK procudure calls going ba= ck > >> and forth over the network. The output of "qemu map" matches the out= put > >> when run against the image on the local filesystem. > >> --- >=20 > I hit a weird failure when trying to compile this on an older RHEL 6 > box, where /usr/include/unistd.h is too old to include SEEK_DATA and > SEEK_HOLE: >=20 > block/gluster.c: In function =E2=80=98qemu_gluster_test_seek=E2=80=99: > block/gluster.c:684: error: =E2=80=98SEEK_DATA=E2=80=99 undeclared (fir= st use in this > function) > block/gluster.c:684: error: (Each undeclared identifier is reported onl= y > once > block/gluster.c:684: error: for each function it appears in.) > block/gluster.c: In function =E2=80=98find_allocation=E2=80=99: > block/gluster.c:1202: error: =E2=80=98SEEK_DATA=E2=80=99 undeclared (fi= rst use in this > function) > block/gluster.c:1234: error: =E2=80=98SEEK_HOLE=E2=80=99 undeclared (fi= rst use in this > function) >=20 > The patch has been in place for several months (which shows how seldom = I > compile on that particular box), but it makes me wonder why none of the > autobuilders have hit this failure. But since the code mentions that i= t > shamelessly copies from raw-posix.c, and that file in turn has #ifdef > guards to only do SEEK_HOLE optimizations if the system headers defined > SEEK_HOLE in the first place, it sounds like you need to do a followup > patch along those lines. >=20 >=20 Ooof. I just sent a patch for this, but I haven't been able to test it yet. I'= m in the process of doing that, but since you have a build env already set = up to do it, would you mind trying the patch (just for compilation on RHEL6)= ? Thanks, Jeff