From patchwork Mon May 20 10:20:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nitesh Shetty X-Patchwork-Id: 13668236 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA783770E6 for ; Mon, 20 May 2024 11:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716205536; cv=none; b=YEx1eXWtahK/+kj2LdDF2bepwBWGRDxzvfmIAZLr3MmV3ncmM09itrEB9UHyllitvw5c0Cy/6X4JkHHEj+OXb0u2RwViJBJosnnIHhCP0AobpUA9gi07OHhHfcyEebOa06rAWJYrm/9ZDEFk43O0QQATOHDL0Is4skx3ckdoGRU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716205536; c=relaxed/simple; bh=cAuZ44MnfXumddyGNuhSAEOj8RADCvGvGuZ/6MB2xIQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:Content-Type: References; b=OCRPYfvuTRJaoliGItpndt17w+thG0Qke2Yd03v8MJETY5gHvnDw+NI8Vu91drqqhqhs8SUhqiCl7AWi6+MFKz+/EfPL0xRpPAb0FTZxYKWZNcyd249zxt+SM7M7t0Qbm94qi9bWUfBbxdW9PEN/yJ1Z5vyr7ca43Cx3HVudrdk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=vbItXjMb; arc=none smtp.client-ip=203.254.224.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="vbItXjMb" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20240520114533epoutp043492c3ffbdde0f40176e168c6e935195~RL9bwHFF-2508025080epoutp04P for ; Mon, 20 May 2024 11:45:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20240520114533epoutp043492c3ffbdde0f40176e168c6e935195~RL9bwHFF-2508025080epoutp04P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1716205533; bh=bSZUkbC/ZQpCoDZSpk6xHyDNFo0X+YS5ZTMJ5s/Gxic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vbItXjMbSQNjCPdJ6bCxcJgvxWcRhv6Q2KjgWtfraq6Df6HoplhOcqKsxEkpUpLg4 xkhWvzhHhLJsjDuj2AtKMvdPSmMXsHEYI7wGNAHrXNKnGvxwwMtClCmI06X8fXYb8P pVwf63mK3N2zXX9r+E1RZJMqrxQIt59rIFc1olcQ= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20240520114532epcas5p3f34132c23d11b79ee9843c7df5910da8~RL9bL1Wrp0451804518epcas5p3n; Mon, 20 May 2024 11:45:32 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.178]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4VjbNV3HLrz4x9Pp; Mon, 20 May 2024 11:45:30 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id F5.80.19431.AD73B466; Mon, 20 May 2024 20:45:30 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20240520103027epcas5p4789defe8ab3bff23bd2abcf019689fa2~RK737w-oH1831418314epcas5p46; Mon, 20 May 2024 10:30:27 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240520103027epsmtrp1946a4d61e2ae40463c15065f4c80c842~RK735Xxv22229722297epsmtrp1e; Mon, 20 May 2024 10:30:27 +0000 (GMT) X-AuditID: b6c32a50-ccbff70000004be7-b5-664b37dab6c6 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id A3.37.19234.3462B466; Mon, 20 May 2024 19:30:27 +0900 (KST) Received: from green245.sa.corp.samsungelectronics.net (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240520103024epsmtip228edfc3ec310b9b2361e5df416cb9fa3~RK70S6Ven2512325123epsmtip2H; Mon, 20 May 2024 10:30:23 +0000 (GMT) From: Nitesh Shetty To: Jens Axboe , Jonathan Corbet , Alasdair Kergon , Mike Snitzer , Mikulas Patocka , Keith Busch , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , Alexander Viro , Christian Brauner , Jan Kara Cc: martin.petersen@oracle.com, bvanassche@acm.org, david@fromorbit.com, hare@suse.de, damien.lemoal@opensource.wdc.com, anuj20.g@samsung.com, joshi.k@samsung.com, nitheshshetty@gmail.com, gost.dev@samsung.com, Nitesh Shetty , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, dm-devel@lists.linux.dev, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v20 11/12] null: Enable trace capability for null block Date: Mon, 20 May 2024 15:50:24 +0530 Message-Id: <20240520102033.9361-12-nj.shetty@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240520102033.9361-1-nj.shetty@samsung.com> X-Brightmail-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aYtnmhBvSmJlVWpRfnxRaU5q8SFGaQ4WJXFe5ZzOFCGB9MSS 1OzU1ILUIpgsEwenVANT0ObT0idPVk6euerWpKztq3Kn3opyVyhcEp0r37H+2FutzrkVfRMe F3Hs35r56Xbc0dV/e7lYp37jaZYQuBefyBZy/N/HvmxhCYNAptbnu49zWqhI3grw41av1quK zla02//S6bXwNStvZymvuD7z8zLdu4/5Z8U8Lvi+ti/0f7fY2cQXSoYd12U2Py0zWrxL0cVT MbRqoqNOaDNj3Fs94XXT+k09wmxLLRaLH/0w8zDzYu0DWQ233HhP7vqhdkLvtoF/otGSF0rJ E1YbaHdvsTUxf/zzvq3VDsWa/b63p2WuUVmZsfTxXdltBiFne9z3b12Se8z2Z4tE45+KEw/5 oq5WsfXdf+hiWyZ3+aMSS3FGoqEWc1FxIgBOVbFnPwMAAA== X-CMS-MailID: 20240520103027epcas5p4789defe8ab3bff23bd2abcf019689fa2 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240520103027epcas5p4789defe8ab3bff23bd2abcf019689fa2 References: <20240520102033.9361-1-nj.shetty@samsung.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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: Hannes Reinecke Signed-off-by: Nitesh Shetty Signed-off-by: Anuj Gupta Reviewed-by: Bart Van Assche --- drivers/block/null_blk/Makefile | 2 -- drivers/block/null_blk/main.c | 3 +++ drivers/block/null_blk/trace.h | 2 ++ drivers/block/null_blk/zoned.c | 1 - 4 files changed, 5 insertions(+), 3 deletions(-) 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 #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 #include "null_blk.h" -#define CREATE_TRACE_POINTS #include "trace.h" #undef pr_fmt