diff options
author | Sam Lang <sam.lang@inktank.com> | 2013-02-12 16:33:19 -0600 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-12 14:44:24 -0800 |
commit | d8c6b08e8e85f10069f379362b0afc2238e4c650 (patch) | |
tree | 373d2c20d6d10de2f2d5f25fca0a53032d46488b | |
parent | ed6c3ff50c0b05665aff45cd3bf47a8ed6135134 (diff) | |
download | ceph-d8c6b08e8e85f10069f379362b0afc2238e4c650.tar.gz |
mds: Add retry field to MDRequest
The MDRequest can be retried via the RetryRequest finisher,
we add a retry field that gets incremented before each
retry in the finisher.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/mds/MDCache.cc | 1 | ||||
-rw-r--r-- | src/mds/Mutation.h | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 2eb8220b3f8..7d04563c78a 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -10582,6 +10582,7 @@ C_MDS_RetryRequest::C_MDS_RetryRequest(MDCache *c, MDRequest *r) void C_MDS_RetryRequest::finish(int r) { + mdr->retry++; cache->dispatch_request(mdr); mdr->put(); } diff --git a/src/mds/Mutation.h b/src/mds/Mutation.h index bb5f1f6febc..8866f6850c6 100644 --- a/src/mds/Mutation.h +++ b/src/mds/Mutation.h @@ -188,6 +188,9 @@ struct MDRequest : public Mutation { // -- i am an internal op int internal_op; + // indicates how may retries of request have been made + int retry; + // break rarely-used fields into a separately allocated structure // to save memory for most ops struct More { @@ -241,6 +244,7 @@ struct MDRequest : public Mutation { alloc_ino(0), used_prealloc_ino(0), snap_caps(0), did_early_reply(false), slave_request(0), internal_op(-1), + retry(0), _more(0) { in[0] = in[1] = 0; } @@ -252,6 +256,7 @@ struct MDRequest : public Mutation { alloc_ino(0), used_prealloc_ino(0), snap_caps(0), did_early_reply(false), slave_request(0), internal_op(-1), + retry(0), _more(0) { in[0] = in[1] = 0; } @@ -263,6 +268,7 @@ struct MDRequest : public Mutation { alloc_ino(0), used_prealloc_ino(0), snap_caps(0), did_early_reply(false), slave_request(0), internal_op(-1), + retry(0), _more(0) { in[0] = in[1] = 0; } |