]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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)
committerPrashant D <pdhange@redhat.com>
Thu, 15 Mar 2018 03:28:36 +0000 (23:28 -0400)
commitc37d2e23cb0d162653083710977c689b09caf167
treeb547c86751120ecba9ab18535d5435f0ef83e2b1
parent31928fea79076a73b873d9491947bdf28f418327
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>
(cherry picked from commit dacc7b6099f5c2e758e2811a7a6722bd0946eb39)

Conflicts:
src/client/Inode.cc: Resolved in Inode::caps_issued_mask
src/client/Client.cc
src/client/Inode.cc
src/client/Inode.h