In ptlrpc_req_add_history() don't allow service_parts with cpt CPT_ANY
(-1) to clobber the timestamp and sequence bits of rq_history_seq.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I52161d6f36dcd70dd569b0be294e6d23cc5ac4a9
Reviewed-on: http://review.whamcloud.com/5207
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
* it must be called with hold svcpt::scp_lock */
new_seq = (sec << REQS_SEC_SHIFT) |
- (usec << REQS_USEC_SHIFT) | svcpt->scp_cpt;
+ (usec << REQS_USEC_SHIFT) |
+ (svcpt->scp_cpt < 0 ? 0 : svcpt->scp_cpt);
+
if (new_seq > svcpt->scp_hist_seq) {
/* This handles the initial case of scp_hist_seq == 0 or
* we just jumped into a new time window */