qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH] block/gluster: add support for SEE


From: Jeff Cody
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH] block/gluster: add support for SEEK_DATA/SEEK_HOLE
Date: Thu, 6 Oct 2016 23:57:01 -0400
User-agent: Mutt/1.5.24 (2015-08-30)

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]
> > 
> > On 03/07/2016 11:04 AM, Niels de Vos wrote:
> >> GlusterFS 3.8 contains support for SEEK_DATA and SEEK_HOLE. This makes
> >> it possible to detect sparse areas in files.
> >>
> >> Signed-off-by: Niels de Vos <address@hidden>
> >>
> >> --
> >> 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 back
> >> and forth over the network. The output of "qemu map" matches the output
> >> when run against the image on the local filesystem.
> >> ---
> 
> 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:
> 
> block/gluster.c: In function ‘qemu_gluster_test_seek’:
> block/gluster.c:684: error: ‘SEEK_DATA’ undeclared (first use in this
> function)
> block/gluster.c:684: error: (Each undeclared identifier is reported only
> once
> block/gluster.c:684: error: for each function it appears in.)
> block/gluster.c: In function ‘find_allocation’:
> block/gluster.c:1202: error: ‘SEEK_DATA’ undeclared (first use in this
> function)
> block/gluster.c:1234: error: ‘SEEK_HOLE’ undeclared (first use in this
> function)
> 
> 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 it
> 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.
> 
> 

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]