Whamcloud - gitweb
LU-2360 ptlrpc: a few fixes for req_history read
authorLiang Zhen <liang@whamcloud.com>
Sun, 23 Dec 2012 09:53:29 +0000 (17:53 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 8 Jan 2013 04:56:37 +0000 (23:56 -0500)
commitd62c7a3a191ec2834a91621709e9d1973ed5d0da
tree2d98e1f253a2a9fb664a469d2d047dcc34a09847
parent35dc2e39288f15abab2d6bf7bb3f572d9670521c
LU-2360 ptlrpc: a few fixes for req_history read

This patch fixed a few issues in seq_file operations of ptlrpc
request history:
- start() function always start from CPT 0 despite of start position,
  this might cause endless read.
- ptlrpc history sequence can't be directly used as read position of
  seq_file, because seq_read() can increase position to indicate
  reading of the next element, this will actually change CPT ID of
  sequence, which means it's possible that next() will never be able
  to finish iteration of requests on a CPT in some case.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I3ee4e06d3b93dcc61bfd910725d4cab87b555511
Reviewed-on: http://review.whamcloud.com/4888
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
lustre/ptlrpc/lproc_ptlrpc.c