gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] [Gluster-users] Performant partial directory listing


From: Anand Avati
Subject: Re: [Gluster-devel] [Gluster-users] Performant partial directory listing through FUSE
Date: Sat, 27 Apr 2013 14:03:02 -0700

(moving to gluster-devel)

To write a safe and generically portable program, it would be good to not depend on telldir/seekdir cookie stability. However gluster takes special pain to provide cookies with safe transformation to keep telldir/seekdir cookies stable across closedir/opendir and even across server and client reboots. Most disk filesystems provide stable seekdir/telldir (maybe not all). I don't think NFS client gives stable cookies to applications (though it expects stable cookies from the server). However in the case of FUSE glusterfs + backend XFS or ext4, you do get stable cookies.

Avati


On Sat, Apr 27, 2013 at 1:47 PM, Brian Candler <address@hidden> wrote:
On Fri, Apr 26, 2013 at 03:10:03PM -0700, Anand Avati wrote:
>    You can do it just like any other filesystem (not specific to either
>    FUSE or gluster) - getdents()/readdir() a small bunch, either retain
>    the open file descriptor or remember the output of telldir()

    "Values returned by telldir() are good only for
     the lifetime of the DIR pointer (e.g., dirp) from which they are derived.
     If the directory is closed and then reopened, prior values returned by
     telldir() will no longer be valid."

(OSX/BSD manpage)

So you have to keep the open file descriptor anyway.


reply via email to

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