mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
blktrace: cleanup the __trace_note_message interface
Pass the cgroup_subsys_state instead of a the blkg so that blktrace doesn't need to poke into blk-cgroup internals, and give the name a blk prefix as the current name is way too generic for a public interface. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20220420042723.1010598-9-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
dec223c92a
commit
f4a6a61cb6
@@ -27,12 +27,10 @@ struct blk_trace {
|
||||
atomic_t dropped;
|
||||
};
|
||||
|
||||
struct blkcg;
|
||||
|
||||
extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);
|
||||
extern void blk_trace_shutdown(struct request_queue *);
|
||||
extern __printf(3, 4)
|
||||
void __trace_note_message(struct blk_trace *, struct blkcg *blkcg, const char *fmt, ...);
|
||||
__printf(3, 4) void __blk_trace_note_message(struct blk_trace *bt,
|
||||
struct cgroup_subsys_state *css, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* blk_add_trace_msg - Add a (simple) message to the blktrace stream
|
||||
@@ -47,14 +45,14 @@ void __trace_note_message(struct blk_trace *, struct blkcg *blkcg, const char *f
|
||||
* NOTE: Can not use 'static inline' due to presence of var args...
|
||||
*
|
||||
**/
|
||||
#define blk_add_cgroup_trace_msg(q, cg, fmt, ...) \
|
||||
#define blk_add_cgroup_trace_msg(q, css, fmt, ...) \
|
||||
do { \
|
||||
struct blk_trace *bt; \
|
||||
\
|
||||
rcu_read_lock(); \
|
||||
bt = rcu_dereference((q)->blk_trace); \
|
||||
if (unlikely(bt)) \
|
||||
__trace_note_message(bt, cg, fmt, ##__VA_ARGS__);\
|
||||
__blk_trace_note_message(bt, css, fmt, ##__VA_ARGS__);\
|
||||
rcu_read_unlock(); \
|
||||
} while (0)
|
||||
#define blk_add_trace_msg(q, fmt, ...) \
|
||||
|
||||
Reference in New Issue
Block a user