[GEDI] Proposal for an extended READDIRPLUS operation via gfAPI
skoduri at redhat.com
Fri Apr 21 13:20:28 UTC 2017
We currently have readdirplus operation to fetch stat for each of the
dirents. But that may not be sufficient and often applications may need
extra information, like for eg., NFS-Ganesha like applications which
operate on handles need to generate handles for each of those dirents
returned. So this would require extra calls to the backend, in this case
LOOKUP (which is very expensive operation) resulting in quite slow
To address that, introducing this new API using which applications can
request for any extra information to be returned as part of
readdirplus response 
Github issue# https://github.com/gluster/glusterfs/issues/174
The interface is designed to be a bit aligned with xstat  format as
suggested by Niels. This helps in extending this operation in future.
The synopsis of this new API - the arguments to be passed and how it can
be used is mentioned in the patch .
Since the initial requirement is to return handles, I have defined it
with glfs_h_* prefix for now, but it may well be used by applications
not having to use them (like SMB). Suggestions are welcome.
The current changes are POC and need to tested extensively but we had
seen a huge performance improvement (with initial patch-set, at least on
a single brick volume).
Request for comments/suggestions on any improvements needed on the
More information about the integration