Message ID | 20240520102033.9361-12-nj.shetty@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Implement copy offload support | expand |
On 5/20/24 03:20, Nitesh Shetty wrote: > This is a prep patch to enable copy trace capability. > At present only zoned null_block is using trace, so we decoupled trace > and zoned dependency to make it usable in null_blk driver also. Reviewed-by: Bart Van Assche <bvanassche@acm.org>
On Mon, May 20, 2024 at 03:50:24PM +0530, Nitesh Shetty wrote: > This is a prep patch to enable copy trace capability. > At present only zoned null_block is using trace, so we decoupled trace > and zoned dependency to make it usable in null_blk driver also. No need to mention the "prep patch", just state what you are doing. Any this could just go out to Jens ASAP.
On 01/06/24 08:23AM, Christoph Hellwig wrote: >On Mon, May 20, 2024 at 03:50:24PM +0530, Nitesh Shetty wrote: >> This is a prep patch to enable copy trace capability. >> At present only zoned null_block is using trace, so we decoupled trace >> and zoned dependency to make it usable in null_blk driver also. > >No need to mention the "prep patch", just state what you are doing. Acked. >Any this could just go out to Jens ASAP. > There is no user of trace apart from zoned and copy offload. Hence this would not make sense as separate patch. Thank you, Nitesh Shetty
diff --git a/drivers/block/null_blk/Makefile b/drivers/block/null_blk/Makefile index 84c36e512ab8..672adcf0ad24 100644 --- a/drivers/block/null_blk/Makefile +++ b/drivers/block/null_blk/Makefile @@ -5,7 +5,5 @@ ccflags-y += -I$(src) obj-$(CONFIG_BLK_DEV_NULL_BLK) += null_blk.o null_blk-objs := main.o -ifeq ($(CONFIG_BLK_DEV_ZONED), y) null_blk-$(CONFIG_TRACING) += trace.o -endif null_blk-$(CONFIG_BLK_DEV_ZONED) += zoned.o diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c index 5d56ad4ce01a..b33b9ebfebd2 100644 --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -11,6 +11,9 @@ #include <linux/init.h> #include "null_blk.h" +#define CREATE_TRACE_POINTS +#include "trace.h" + #undef pr_fmt #define pr_fmt(fmt) "null_blk: " fmt diff --git a/drivers/block/null_blk/trace.h b/drivers/block/null_blk/trace.h index 82b8f6a5e5f0..f9eadac6b22f 100644 --- a/drivers/block/null_blk/trace.h +++ b/drivers/block/null_blk/trace.h @@ -30,6 +30,7 @@ static inline void __assign_disk_name(char *name, struct gendisk *disk) } #endif +#ifdef CONFIG_BLK_DEV_ZONED TRACE_EVENT(nullb_zone_op, TP_PROTO(struct nullb_cmd *cmd, unsigned int zone_no, unsigned int zone_cond), @@ -73,6 +74,7 @@ TRACE_EVENT(nullb_report_zones, TP_printk("%s nr_zones=%u", __print_disk_name(__entry->disk), __entry->nr_zones) ); +#endif /* CONFIG_BLK_DEV_ZONED */ #endif /* _TRACE_NULLB_H */ diff --git a/drivers/block/null_blk/zoned.c b/drivers/block/null_blk/zoned.c index 5b5a63adacc1..47470a732d21 100644 --- a/drivers/block/null_blk/zoned.c +++ b/drivers/block/null_blk/zoned.c @@ -3,7 +3,6 @@ #include <linux/bitmap.h> #include "null_blk.h" -#define CREATE_TRACE_POINTS #include "trace.h" #undef pr_fmt