[Top] [All Lists]

Re: [PATCH] xfsdump: don't assume getdents exists

To: Kyle McMartin <kyle@xxxxxxxxxx>
Subject: Re: [PATCH] xfsdump: don't assume getdents exists
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 6 Nov 2013 23:06:22 -0800
Cc: sandeen@xxxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20131107065835.GA24345@xxxxxxxxxxxxx>
References: <20131106213635.GC24712@xxxxxxxxxxxxxxxxxxxxxxx> <20131107065835.GA24345@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Nov 06, 2013 at 10:58:35PM -0800, Christoph Hellwig wrote:
> On Wed, Nov 06, 2013 at 04:36:35PM -0500, Kyle McMartin wrote:
> > New Linux ports are using a standard syscall list that does not include
> > deprecated syscalls where 64-bit clean alternatives exist. As a result,
> > on arm64, __NR_getdents is undefined, resulting in xfsdump failing to
> > build.
> > 
> > To avoid that, in the case where __NR_getdents is unset in unistd.h,
> > avoid building the fallback path entirely, since
> > __ASSUME_GETDENTS64_SYSCALL will be true, the SYS_getdents64 case will
> > be the primary (and only) path used.
> Seems like we could drop this mess of a file entirely and just rely
> on getdents64 from glibc.  The raison d'etre of that file appears to
> support 64 bit getdents before glibc really supported it, and I don't
> think we'll have to support such old configurations anymore.  I'll give
> it a quick spin and see how that works out.

Turns out there is no glibc wrapper for getdents, so unless we want
to use the buffered readdir code we'll have to stick to some variant of
this.  But I think we can just kill the fallback and use getdents64

<Prev in Thread] Current Thread [Next in Thread>