From 9e7f48b9b6e128bc664e76919c7e25c5ebd2d75a Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Tue, 29 Jan 2013 20:23:13 -0600 Subject: [PATCH] LU-2360 ptlrpc: don't clobber rq_history_seq with CPT_ANY 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 Change-Id: I52161d6f36dcd70dd569b0be294e6d23cc5ac4a9 Reviewed-on: http://review.whamcloud.com/5207 Tested-by: Hudson Reviewed-by: Liang Zhen Reviewed-by: Andreas Dilger Tested-by: Maloo --- lustre/ptlrpc/events.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/ptlrpc/events.c b/lustre/ptlrpc/events.c index ef0b698..e2f098e 100644 --- a/lustre/ptlrpc/events.c +++ b/lustre/ptlrpc/events.c @@ -261,7 +261,9 @@ static void ptlrpc_req_add_history(struct ptlrpc_service_part *svcpt, * 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 */ -- 1.8.3.1