Lines Matching full:acc

64 static inline void bpos_to_disk_accounting_pos(struct disk_accounting_pos *acc, struct bpos p)  in bpos_to_disk_accounting_pos()  argument
66 BUILD_BUG_ON(sizeof(*acc) != sizeof(p)); in bpos_to_disk_accounting_pos()
69 acc->_pad = p; in bpos_to_disk_accounting_pos()
71 memcpy_swab(acc, &p, sizeof(p)); in bpos_to_disk_accounting_pos()
75 static inline struct bpos disk_accounting_pos_to_bpos(struct disk_accounting_pos *acc) in disk_accounting_pos_to_bpos() argument
79 p = acc->_pad; in disk_accounting_pos_to_bpos()
81 memcpy_swab(&p, acc, sizeof(p)); in disk_accounting_pos_to_bpos()
121 static inline bool bch2_accounting_is_mem(struct disk_accounting_pos acc) in bch2_accounting_is_mem() argument
123 return acc.type < BCH_DISK_ACCOUNTING_TYPE_NR && in bch2_accounting_is_mem()
124 acc.type != BCH_DISK_ACCOUNTING_inum; in bch2_accounting_is_mem()
136 struct bch_accounting_mem *acc = &c->accounting; in bch2_accounting_mem_mod_locked() local
141 if (gc && !acc->gc_running) in bch2_accounting_mem_mod_locked()
170 while ((idx = eytzinger0_find(acc->k.data, acc->k.nr, sizeof(acc->k.data[0]), in bch2_accounting_mem_mod_locked()
171 accounting_pos_cmp, &a.k->p)) >= acc->k.nr) { in bch2_accounting_mem_mod_locked()
177 struct accounting_mem_entry *e = &acc->k.data[idx]; in bch2_accounting_mem_mod_locked()
194 static inline void bch2_accounting_mem_read_counters(struct bch_accounting_mem *acc, in bch2_accounting_mem_read_counters() argument
199 if (unlikely(idx >= acc->k.nr)) in bch2_accounting_mem_read_counters()
202 struct accounting_mem_entry *e = &acc->k.data[idx]; in bch2_accounting_mem_read_counters()
214 struct bch_accounting_mem *acc = &c->accounting; in bch2_accounting_mem_read() local
215 unsigned idx = eytzinger0_find(acc->k.data, acc->k.nr, sizeof(acc->k.data[0]), in bch2_accounting_mem_read()
218 bch2_accounting_mem_read_counters(acc, idx, v, nr, false); in bch2_accounting_mem_read()