]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
client: allow getattr, lookup, fstatx, and readdir to use implemented caps
authorJeff Layton <jlayton@redhat.com>
Tue, 20 Feb 2018 18:54:56 +0000 (13:54 -0500)
committerJeff Layton <jlayton@redhat.com>
Sat, 3 Mar 2018 13:29:29 +0000 (08:29 -0500)
commitdacc7b6099f5c2e758e2811a7a6722bd0946eb39
tree7363854c7e26ab38f915d852b1100ad027cbbfba
parent1932cd1a83443e0010dc3c60ee9dd103ef326eb3
client: allow getattr, lookup, fstatx, and readdir to use implemented caps

caps_issued_mask is a function that we call to see if we have all of
the caps provided in a mask. Usually this ignores caps that have been
revoked by the MDS but that have not yet been released by the client.
These caps are still valid though -- nothing else can use them until
they've been released.

These codepaths call caps_issued_mask only in order to determine
whether the client holds enough caps to trust cached attributes. They
don't take new references to the caps, so it should be safe to use the
"implemented" capset in these functions.

This helps break a deadlock that can occur when the client holds a
delegation that has been recalled, but needs to satisfy a getattr
request before releasing it.

Tracker: http://tracker.ceph.com/issues/23028
Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/Client.cc
src/client/Inode.cc
src/client/Inode.h