[Gluster-devel] READDIR bug in NFS server (wasl: mount.t oddity)

Emmanuel Dreyfus manu at netbsd.org
Fri Aug 15 14:32:56 UTC 2014


Emmanuel Dreyfus <manu at netbsd.org> wrote:

> Fixing this is not straightforward. The eof field is set in the NFS reply
> frame by nfs3_fill_readdir3res() when op_errno is ENOENT. Here is below the
> kind of backtrace to  nfs3_fill_readdir3res() I get when mounting the NFS
> filesystem. Further debugging shows op_errno is always 0. Obviously there must
> be a op_errno = ENOENT missing somewhere in caller functions, but I have
> trouble to tell where. I do not see anything going to the posix xlator as I
> would have expected.

But I was a bit confused, as the request must go to bricks from NFS server
which act as a gluster client. In bricks the posix xlator is involded. It
ineed sets errno = ENOENT in posix_fill_readdir() when reaching the end of
directory.

The backtrace leading to posix_fill_readdir() is below. The next question is
once errno is set within an IO thread, how is it transmitted to the glusterfs
server part so that it has a chance to be seen by the client?

0xb9bef7ad <posix_fill_readdir+1369> at
/autobuild/install/lib/glusterfs/3.7dev/xlator/storage/posix.so
0xb9befe9d <posix_do_readdir+703> at
/autobuild/install/lib/glusterfs/3.7dev/xlator/storage/posix.so
0xb9bf0300 <posix_readdirp+618> at
/autobuild/install/lib/glusterfs/3.7dev/xlator/storage/posix.so
0xbb779b90 <default_readdirp+147> at /autobuild/install/lib/libglusterfs.so.0
0xbb30dc96 <posix_acl_readdirp+814> at
/autobuild/install/lib/glusterfs/3.7dev/xlator/features/access-control.so
0xb9bc7ca3 <pl_readdirp+815> at
/autobuild/install/lib/glusterfs/3.7dev/xlator/features/locks.so
0xbb77742a <default_readdirp_resume+518> at
/autobuild/install/lib/libglusterfs.so.0
0xbb78f043 <fop_zerofill_stub+4271> at
/autobuild/install/lib/libglusterfs.so.0
0xbb795cac <call_resume+175> at /autobuild/install/lib/libglusterfs.so.0
0xb9bb2e05 <iot_worker+554> at
/autobuild/install/lib/glusterfs/3.7dev/xlator/performance/io-threads.so
0xbb705783 <pthread_setcancelstate+372> at /usr/lib/libpthread.so.1
0xbb491ee0 <_lwp_exit+0> at /usr/lib/libc.so.12

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu at netbsd.org


More information about the Gluster-devel mailing list