Re: [Gluster-users] Performant partial directory listing through FUSE

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

 



(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 <B.Candler@xxxxxxxxx> 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.


[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux