Files
kernel_google_b1c1/include/linux
Konstantin Khlebnikov 4cfee666f0 fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long
[ Upstream commit 6fcbcec9cfc7b3c6a2c1f1a23ebacedff7073e0a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-04 13:40:50 +01:00
..
2019-04-17 08:36:45 +02:00
2017-10-08 10:26:06 +02:00
2018-04-24 09:34:18 +02:00
2018-02-28 10:18:33 +01:00
2019-03-23 13:19:52 +01:00
2017-07-15 12:16:11 +02:00
2017-05-14 14:00:22 +02:00
2019-11-25 09:53:14 +01:00
2017-07-12 15:01:02 +02:00
2017-08-06 18:59:43 -07:00
2016-10-20 15:51:28 +11:00
2018-10-10 08:53:18 +02:00
2017-08-24 17:12:19 -07:00
2016-10-19 11:36:22 -06:00
2017-08-24 17:12:21 -07:00
2016-10-14 11:36:59 -07:00
2017-08-30 10:21:40 +02:00
2019-11-10 11:23:31 +01:00
2016-10-05 18:23:36 -04:00
2019-04-17 08:36:39 +02:00
2018-11-13 11:17:02 -08:00
2019-06-17 19:53:32 +02:00
2018-11-27 16:09:41 +01:00
2017-04-21 09:31:21 +02:00
2017-12-25 14:23:37 +01:00
2018-12-05 19:42:42 +01:00