diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2020-03-25 20:49:55 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-27 22:39:10 +0300 |
commit | c51d04199826824944ed563748c9542eea27c2d7 (patch) | |
tree | b903c7c7edb2881ab10d29d0aee4715eba7cfeea /drivers/block/null_blk_trace.c | |
parent | 02694e86356dcf72d39329e52630234ad687e206 (diff) | |
download | linux-c51d04199826824944ed563748c9542eea27c2d7.tar.xz |
null_blk: add tracepoint helpers for zoned mode
This patch adds two new tracpoints for null_blk_zoned.c that allows us
to trace report-zones, zone-mgmt-op and zone-write operations which has
direct effect on the zone condition state machine.
Also, we update drivers/block/Makefile so that new null_blk related
tracefiles can be compiled.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/null_blk_trace.c')
-rw-r--r-- | drivers/block/null_blk_trace.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/block/null_blk_trace.c b/drivers/block/null_blk_trace.c new file mode 100644 index 000000000000..f246e7bff698 --- /dev/null +++ b/drivers/block/null_blk_trace.c @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * null_blk trace related helpers. + * + * Copyright (C) 2020 Western Digital Corporation or its affiliates. + */ +#include "null_blk_trace.h" + +/* + * Helper to use for all null_blk traces to extract disk name. + */ +const char *nullb_trace_disk_name(struct trace_seq *p, char *name) +{ + const char *ret = trace_seq_buffer_ptr(p); + + if (name && *name) + trace_seq_printf(p, "disk=%s, ", name); + trace_seq_putc(p, 0); + + return ret; +} |