Project

General

Profile

Actions

Bug #23028

closed

client: allow client to use caps that are revoked but not yet returned

Added by Jeff Layton about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client, Ganesha FSAL, MDS
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I found a problem with ceph and delegations.

NFS client holds a read delegation on a file. That gets recalled by ganesha due to the MDS revoking some caps.

The NFS DELEGRETURN compound does a GETATTR just before the DELEGRETURN. (Mostly it does this for write delegations -- presumably the client will have flushed all of its cached writes just before returning the delegation and it wants an updated cache after that activity).

Ganesha calls down into cephfs to satisfy the getattr. That results in the ceph client sending a GETATTR request to the MDS, because the caps it had have now been revoked. The MDS won't satisfy the request however until the client returns the caps held by the delegation. Deadlock. Eventually ganesha revokes the delegation and things unwedge, but that's not a good outcome.

I think we can loosen this up a little bit. Currently in->caps_issued_mask only considers caps that the MDS has most recently granted, but revoked caps are still valid up until the point where a cap return is issued. Can we allow caps_issued_mask to also consider caps in this state to be valid?

I think that might help resolve this deadlock


Files


Related issues 1 (0 open1 closed)

Copied to CephFS - Backport #23314: luminous: client: allow client to use caps that are revoked but not yet returnedResolvedPrashant DActions
Actions

Also available in: Atom PDF