LU-12394 llite: Fix extents_stats
Patch 32517 from LU-8066 changed:
(1 << LL_HIST_START << i)
To:
BIT(LL_HIST_START << i)
But these are not equivalent because this changes the order
of operations. The earlier one does the operations in this
order:
(1 << LL_HIST_START) << i
The new one is this order:
1 << (LL_HIST_START << i)
Which is quite different, as it's left shifting
LL_HIST_START directly, and LL_HIST_START is a number of
bits.
The goal is really just to start with BIT(LL_HIST_START)
and left shift by one (going from 4K, to 8K, etc) each
time, so just use:
BIT(LL_HIST_START + i)
The result of this was that all i/os over 8K were placed in
the 4K-8K stat bucket, because the loop exited early.
Also add mmap'ed reads & writes to extents_stats.
Add test for extents_stats.
Fixes:
adb5aca3d673 ("LU-8066 llite: Move all remaining procfs entries
to debugfs")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Iab4dc097234d411601a18d501075df45791d1138
Reviewed-on: https://review.whamcloud.com/35075
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>