[Gluster-devel] Invalid DIR * usage in quota xlator
J. Bruce Fields
bfields at fieldses.org
Wed Oct 15 14:20:50 UTC 2014
On Wed, Oct 15, 2014 at 01:26:19PM +0200, Emmanuel Dreyfus wrote:
> Anand Avati <avati at gluster.org> wrote:
>
> > Is there a way to get hold of the directory entry cookies used by NFS
> > readdir from user-space? some sort of a NetBSD specific syscall (like
> > getdents of Linux)?
>
> NetBSD has getdents(2) too, but it returns buffer of struct dirent that
> have no NFS cookies. On Linux, getdents(2) returns buffers of struct
> dirent or dirent64, but I see no NFS cookie there either.
On Linux, it's returned in the d_off field.
Googling around.... the NetBSD manpage doesn't mention any d_off field,
but it does have this:
http://nixdoc.net/man-pages/netbsd/man2/getdents.2.html
The current position pointer may be set and retrieved by
lseek(2). The current position pointer should only be set to a
value returned by lseek(2), or zero.
So maybe that's what you want.
--b.
More information about the Gluster-devel
mailing list