]> git.karo-electronics.de Git - linux-beck.git/commit
staging/lustre/lprocfs: use stats counter index for *pos
authorJohn L. Hammond <john.hammond@intel.com>
Mon, 3 Jun 2013 13:40:51 +0000 (21:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jun 2013 18:26:36 +0000 (11:26 -0700)
commitedb4973dbc4b729098ba081225bf370e19081127
tree4bc3fbf8ad64147034c6796e01ce5dfab20968ff
parent3b2f75fd590dfefffc11dc5050ca90394fc1a70d
staging/lustre/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.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2979
Lustre-change: http://review.whamcloud.com/6328
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c