[GEDI] Proposal for an extended READDIRPLUS operation via gfAPI

Soumya Koduri skoduri at redhat.com
Fri Apr 21 13:20:28 UTC 2017


Hi,

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
readdir performance.

To address that, introducing this new API using which applications can
request for any extra information to be returned as part of
readdirplus response [1]

Patch: https://review.gluster.org/#/c/15663
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1442950
Github issue#  https://github.com/gluster/glusterfs/issues/174

The interface is designed to be a bit aligned with xstat [2] 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 [3].

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 
interface.

Thanks,
Soumya

[1] https://review.gluster.org/#/c/15663
[2] https://lwn.net/Articles/394298/
[3] https://review.gluster.org/#/c/15663/8/api/src/glfs-handles.h


More information about the integration mailing list