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/6328Signed-off-by: NJohn L. Hammond <john.hammond@intel.com> Reviewed-by: Nwangdi <di.wang@intel.com> Reviewed-by: NBobi Jam <bobijam@gmail.com> Reviewed-by: NEmoly Liu <emoly.liu@intel.com> Reviewed-by: NKeith Mannthey <keith.mannthey@intel.com> Reviewed-by: NOleg Drokin <oleg.drokin@intel.com> Signed-off-by: NPeng Tao <tao.peng@emc.com> Signed-off-by: NAndreas Dilger <andreas.dilger@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录