[Gluster-devel] How to fix wrong telldir/seekdir usage

Emmanuel Dreyfus manu at netbsd.org
Thu Sep 18 08:47:54 UTC 2014


On Sat, Sep 13, 2014 at 01:34:58PM -0700, Anand Avati wrote:
> How does the NetBSD nfs server provide stable directory offsets, for the
> NFS client to resume reading from at a later point in time? Very similar
> problems are present in that scenario and it might be helpful to see what
> approaches are taken there (which are probably more tried and tested)

I still do not have an answer for this question, but I have a patch to 
fix the standard-violating seekdir() usage. As discussed in this threead,
I remove fd anonymity in afr-selfèheald.c:
http://review.gluster.org/8760

The resource cleanup code may be wrong, it needs review. At least the
patch lets NetBSD pass self-held.t without getting locked into an 
infinite loop.

For the NFS question, I suspect it is out of scope: seekdir() does not
operate at kernel interface level, but at libc level; the data we
see from readdir() are cached in userland, and adding a node will not 
invalidate them. I have to run tess to confirm, though.


-- 
Emmanuel Dreyfus
manu at netbsd.org


More information about the Gluster-devel mailing list