diff options
author | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> | 2019-11-10 12:49:06 +0300 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2019-11-11 11:06:27 +0100 |
commit | 6fcbcec9cfc7b3c6a2c1f1a23ebacedff7073e0a (patch) | |
tree | 4552e3c0221e26fc3d0552ed677f553b54f668c5 /fs/reiserfs/namei.c | |
parent | 355b9aae868512747c0ff90231e8ae8ea0278a60 (diff) | |
download | blackbird-op-linux-6fcbcec9cfc7b3c6a2c1f1a23ebacedff7073e0a.tar.gz blackbird-op-linux-6fcbcec9cfc7b3c6a2c1f1a23ebacedff7073e0a.zip |
fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long
Quota statistics counted as 64-bit per-cpu counter. Reading sums per-cpu
fractions as signed 64-bit int, filters negative values and then reports
lower half as signed 32-bit int.
Result may looks like:
fs.quota.allocated_dquots = 22327
fs.quota.cache_hits = -489852115
fs.quota.drops = -487288718
fs.quota.free_dquots = 22083
fs.quota.lookups = -486883485
fs.quota.reads = 22327
fs.quota.syncs = 335064
fs.quota.writes = 3088689
Values bigger than 2^31-1 reported as negative.
All counters except "allocated_dquots" and "free_dquots" are monotonic,
thus they should be reported as is without filtering negative values.
Kernel doesn't have generic helper for 64-bit sysctl yet,
let's use at least unsigned long.
Link: https://lore.kernel.org/r/157337934693.2078.9842146413181153727.stgit@buzz
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/reiserfs/namei.c')
0 files changed, 0 insertions, 0 deletions