I sent a preliminary patchset for this back in April, which relied on a totally hacked-up MDS patchset. Since then, Zheng has modified the approach somewhat to make the MDS grant the client explicit capabilities for asynchronous directory operations. This patchset is an updated version of the earlier set. With this, and the companion MDS set in play, removing a directory with a large number of files in it is roughly twice as fast as doing it synchronously. In addition this set includes some new tracepoints that allow the admin to better view what's happening with caps. They're mostly limited to unlink and cap handling here, but I expect we'll add more of those as time goes on. I don't think we'll want to merge this just yet, until the MDS support is merged. Once that goes in, and assuming we don't have any changes to the client/MDS interface, we should clear to do so. Jeff Layton (7): ceph: make several helper accessors take const pointers ceph: hold extra reference to r_parent over life of request ceph: register MDS request with dir inode from the get-go ceph: add refcounting for Fx caps ceph: wait for async dir ops to complete before doing synchronous dir ops ceph: new tracepoints when adding and removing caps ceph: add tracepoints for async and sync unlink Yan, Zheng (2): ceph: check inode type for CEPH_CAP_FILE_{CACHE,RD,REXTEND,LAZYIO} ceph: perform asynchronous unlink if we have sufficient caps fs/ceph/Makefile | 3 +- fs/ceph/caps.c | 88 +++++++++++++++++------ fs/ceph/dir.c | 121 ++++++++++++++++++++++++++++++-- fs/ceph/file.c | 4 ++ fs/ceph/inode.c | 9 ++- fs/ceph/mds_client.c | 27 +++---- fs/ceph/super.h | 28 ++++---- fs/ceph/trace.c | 76 ++++++++++++++++++++ fs/ceph/trace.h | 86 +++++++++++++++++++++++ include/linux/ceph/ceph_debug.h | 1 + include/linux/ceph/ceph_fs.h | 9 +++ 11 files changed, 393 insertions(+), 59 deletions(-) create mode 100644 fs/ceph/trace.c create mode 100644 fs/ceph/trace.h -- 2.21.0