hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/md/bcache/stats.c
....@@ -109,9 +109,13 @@
109109
110110 void bch_cache_accounting_clear(struct cache_accounting *acc)
111111 {
112
- memset(&acc->total.cache_hits,
113
- 0,
114
- sizeof(unsigned long) * 7);
112
+ acc->total.cache_hits = 0;
113
+ acc->total.cache_misses = 0;
114
+ acc->total.cache_bypass_hits = 0;
115
+ acc->total.cache_bypass_misses = 0;
116
+ acc->total.cache_readaheads = 0;
117
+ acc->total.cache_miss_collisions = 0;
118
+ acc->total.sectors_bypassed = 0;
115119 }
116120
117121 void bch_cache_accounting_destroy(struct cache_accounting *acc)