<div dir="ltr">(moving to gluster-devel)<div><br></div><div style>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&#39;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.</div>
<div style><br></div><div style>Avati</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 27, 2013 at 1:47 PM, Brian Candler <span dir="ltr">&lt;<a href="mailto:B.Candler@pobox.com" target="_blank">B.Candler@pobox.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Apr 26, 2013 at 03:10:03PM -0700, Anand Avati wrote:<br>
&gt;    You can do it just like any other filesystem (not specific to either<br>
&gt;    FUSE or gluster) - getdents()/readdir() a small bunch, either retain<br>
&gt;    the open file descriptor or remember the output of telldir()<br>
<br>
</div>    &quot;Values returned by telldir() are good only for<br>
     the lifetime of the DIR pointer (e.g., dirp) from which they are derived.<br>
     If the directory is closed and then reopened, prior values returned by<br>
     telldir() will no longer be valid.&quot;<br>
<br>
(OSX/BSD manpage)<br>
<br>
So you have to keep the open file descriptor anyway.<br>
</blockquote></div><br></div>