Whamcloud - gitweb
LU-2979 lprocfs: use stats counter index for *pos
authorJohn L. Hammond <john.hammond@intel.com>
Mon, 13 May 2013 16:42:36 +0000 (11:42 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 14 May 2013 15:30:19 +0000 (11:30 -0400)
commit6fe7c32906f67f43d815c884ed8a902bb2333992
tree6d31103742d5077fe2fe5a2eeb8ce03e6998e039
parent4d64e4ec82df2b873a20a2a4a285a2bfba2a39fd
LU-2979 lprocfs: use stats counter index for *pos

In lprocfs_stats_seq_{start,next,show,stop}() encode the counter index
(rather than the counter address) into *pos. Doing so simplifies these
functions and fixes a bug in the case of per-CPU stats where no stats
would be displayed at all if no events had yet occurred on CPU 0.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id50f8ae480e151f8e16382db27eef8025ef69f15
Reviewed-on: http://review.whamcloud.com/6328
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/lprocfs_status.c