Lines Matching refs:_c
228 #define count_event(_c, _name) this_cpu_inc((_c)->counters[BCH_COUNTER_##_name])
230 #define trace_and_count(_c, _name, ...) \
232 count_event(_c, _name); \
249 #define bch2_log_msg(_c, fmt) "bcachefs (%s): " fmt, ((_c)->name)
252 #define bch2_fmt_inum(_c, _inum, fmt) "bcachefs (%s inum %llu): " fmt "\n", ((_c)->name), (_inum)
253 #define bch2_fmt_inum_offset(_c, _inum, _offset, fmt) \
254 "bcachefs (%s inum %llu offset %llu): " fmt "\n", ((_c)->name), (_inum), (_offset)
258 #define bch2_log_msg(_c, fmt) fmt
261 #define bch2_fmt_inum(_c, _inum, fmt) "inum %llu: " fmt "\n", (_inum)
262 #define bch2_fmt_inum_offset(_c, _inum, _offset, fmt) \
267 #define bch2_fmt(_c, fmt) bch2_log_msg(_c, fmt "\n")
275 #define maybe_dev_to_fs(_c) _Generic((_c), \
276 struct bch_dev *: ((struct bch_dev *) (_c))->fs, \
277 struct bch_fs *: (_c))
279 #define bch2_print(_c, ...) __bch2_print(maybe_dev_to_fs(_c), __VA_ARGS__)
281 #define bch2_print_ratelimited(_c, ...) \
288 bch2_print(_c, __VA_ARGS__); \
327 #define bch_err_fn(_c, _ret) \
330 bch_err(_c, "%s(): error %s", __func__, bch2_err_str(_ret));\
333 #define bch_err_fn_ratelimited(_c, _ret) \
336 bch_err_ratelimited(_c, "%s(): error %s", __func__, bch2_err_str(_ret));\
339 #define bch_err_msg(_c, _ret, _msg, ...) \
342 bch_err(_c, "%s(): error " _msg " %s", __func__, \