]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: set issue_seq (not seq) in cap release
authorSage Weil <sage@inktank.com>
Sun, 9 Jun 2013 00:38:07 +0000 (17:38 -0700)
committerSage Weil <sage@inktank.com>
Tue, 11 Jun 2013 20:56:45 +0000 (13:56 -0700)
commit9b012e234a924efd718826ab6a53b9aeb7cd6649
tree2a75cd6b5213771fd5ca878f524efe80c2ca567c
parent3f2017fb1797333232b802cac5f9cdc2338723fe
client: set issue_seq (not seq) in cap release

We regularly have been observing a stall where the MDS is blocked waiting
for a cap revocation (Ls, in our case) and never gets a reply.  We finally
tracked down the sequence:

 - mds issues cap seq 1 to client
 - mds does revocation (seq 2)
 - client replies
 - much time goes by
 - client trims inode from cache, sends release with seq == 2
 - mds ignores release because its issue_seq is 1
 - mds later tries to revoke other caps
 - client discards message because it doesn't have the inode in cache

The problem is simply that we are using seq instead of issue_seq in the
cap release message.  Note that the other release call site in
encode_inode_release() is correct.  That one is much more commonly
triggered by short tests, as compared to this case where the inode needs to
get pushed out of the client cache.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/client/Client.cc