[Top] [All Lists]

Re: [PATCH] xfsprogs/io: add getdents command

To: Brian Foster <bfoster@xxxxxxxxxx>
Subject: Re: [PATCH] xfsprogs/io: add getdents command
From: Zach Brown <zab@xxxxxxxxxx>
Date: Tue, 23 Jul 2013 09:26:57 -0700
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <51EE9AC9.2050306@xxxxxxxxxx>
References: <1373567034-7534-1-git-send-email-bfoster@xxxxxxxxxx> <20130715183845.GS25414@xxxxxxxxxxxxxxxxxxxx> <51EE9AC9.2050306@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Jul 23, 2013 at 11:01:29AM -0400, Brian Foster wrote:
> On 07/15/2013 02:38 PM, Zach Brown wrote:
> >> +ifeq ($(PKG_PLATFORM),linux)
> >> +CFILES += getdents.c
> >> +endif
> > 
> > I'd make a real test for getdents() rather than tying it to Linux.  Just
> > copy what's done for sync_file_range :). 
> > 
> Having a look back, I think a reason why I avoided this was I didn't
> have a libc interface for getdents.

Bleh, yeah.  I guess you could test for the syscall(__NR,) signature.

> Perhaps there's still a way to test that, but I'm also wondering if
> this would be more broadly useful if I just converted it over to
> generic readdir(). Thoughts?

That seems reasonable, given that's what apps actually use.  If tests
really wanted to inspect getdents specifically they can worry about it.

- z

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