From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D1B1CCFA0D for ; Wed, 5 Nov 2025 10:34:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qxaa2JVRO5iqXs34BoMCLiqKIKAlpIXCahAH4vhqm8A=; b=iUgHKqKY5cxl9XoqBd34yyCk2q cr5a7pzhfqAUJJ4+nwmjV56KqF8d+qMaI1TadltU3XzqTiUz7w+EmGGvEFsNo6jKnPMa5e6Ei6Z3G AIyIZWcQGauy3gnmY21U0qcwx2/oEmO1SvI9zX5544w+VQKb6QAb3kGmRB/s3cTHnJEvAFaAO4G76 Vo2DEuOgyH4ce/gAkUotVaPCQLd1fmGLFxdyrQI9zVS5xffGIdJAhej/Q/fAXlYiPK0UCdA1EjNAB fvZrz8x3hXygyiOxPfwVyZ9VrneQgYV7ufvxtPvonwNCE2Vn3r8q+dJXUcowGat0XCEIz5sM+TYTo vTwLBLYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vGaq3-0000000DTdo-3ziG; Wed, 05 Nov 2025 10:34:03 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vGaq1-0000000DTd9-0qmN for linux-nvme@lists.infradead.org; Wed, 05 Nov 2025 10:34:02 +0000 Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5A56b5Y1012367; Wed, 5 Nov 2025 10:33:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=qxaa2JVRO5iqXs34B oMCLiqKIKAlpIXCahAH4vhqm8A=; b=psiGqK7y8jb4dZj+p/bKy+x78ibeTw69S 5oBNdIMdm9aZqZwYYyzK/gcRs88yJKryDD3AMQ1fvnqCVWliB0vsud9arhIPz3xo FMMzdx2DEHfgJz+I1cno1DKYm3RnR2M560vM5KLwvI39E+qabvR8dsyhH3TV2G3Y XBrFxpJBWTbI+zmyQSsYMgjUbdwSlaLX+uiEBAXV0bGDlmJEmAdW/7lTBTLOh76d SjbAwfKefNmUEjv2YI6m8eqPe/QfiCYMxXWdPOnr3O2ytcSx5rvLxzruJyFyv4ti 8MdvlYZ3umDgWuJQp7TgUgL7u0gekXRTFdUDlNHH2OI67DEQUvLcw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4a58mm0fbx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Nov 2025 10:33:56 +0000 (GMT) Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.18.1.12/8.18.0.8) with ESMTP id 5A5AWmSp020670; Wed, 5 Nov 2025 10:33:56 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4a58mm0fbt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Nov 2025 10:33:56 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 5A599DGb012923; Wed, 5 Nov 2025 10:33:55 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 4a5y81y920-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Nov 2025 10:33:55 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 5A5AXrGn39846208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 5 Nov 2025 10:33:53 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 99C3D2004E; Wed, 5 Nov 2025 10:33:53 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 74C1C20043; Wed, 5 Nov 2025 10:33:51 +0000 (GMT) Received: from li-c9696b4c-3419-11b2-a85c-f9edc3bf8a84.in.ibm.com (unknown [9.109.198.245]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 5 Nov 2025 10:33:51 +0000 (GMT) From: Nilay Shroff To: linux-nvme@lists.infradead.org Cc: hare@suse.de, hch@lst.de, kbusch@kernel.org, sagi@grimberg.me, dwagner@suse.de, axboe@kernel.dk, kanie@linux.alibaba.com, gjoyce@ibm.com Subject: [RFC PATCHv5 1/7] block: expose blk_stat_{enable,disable}_accounting() to drivers Date: Wed, 5 Nov 2025 16:03:20 +0530 Message-ID: <20251105103347.86059-2-nilay@linux.ibm.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251105103347.86059-1-nilay@linux.ibm.com> References: <20251105103347.86059-1-nilay@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: NvaaiNE90t8IVd2oSJI42ny12oHn-I6H X-Proofpoint-GUID: OyGf1ll6Xz0pDH3hXSKzU7g2w_1wNNpu X-Authority-Analysis: v=2.4 cv=SqidKfO0 c=1 sm=1 tr=0 ts=690b2814 cx=c_pps a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17 a=6UeiqGixMTsA:10 a=VkNPw1HP01LnGYTKEx00:22 a=VnNF1IyMAAAA:8 a=SifjupJSLTu-I8RqnBoA:9 a=cPQSjfK2_nFv0Q5t_7PE:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTAxMDAwOSBTYWx0ZWRfXycaIq0LZdmqo /CD4CoQEet3M5t0pcU24jnt5n5EMoABRWR/kgQPQB3k5SqCm3hJsJBobPR6RFwMGcjlmKp6MqG8 WxRoKwvjPlsGy/Z0qFnjmevKbwcyIcaMgLC+9fWGRD43j+DiGjXwY8kYbClzmMRwuJAq+k6tPsK RvBHPWZ2mcHoaj7VR6RWwMTEnRhzDAMFQF6+HhAwNz7k+pFFxvKv1jXCc5IGDGO515z/dW78xor 3JnmJQgfDOlEEu5mX6lnMMYK4z8QkF6j6EJF0KNVxe+ACqGADgE1rgxJ7W7aZ6ugKnVviAbye5G 4P6Y93vT4dEVFoEtBAdYmaZ3u9w26IGuLaGY9I+25YhThHxrf9E/oENzVLIsDSokTFSYJDmxuwL INLN3iUSTA6DZYtqWIx0LWZgdNZmUg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-05_04,2025-11-03_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 impostorscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 priorityscore=1501 bulkscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2510240000 definitions=main-2511010009 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251105_023401_371201_B9A1135A X-CRM114-Status: GOOD ( 14.30 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org The functions blk_stat_enable_accounting() and blk_stat_disable_accounting() are currently exported, but their prototypes are only defined in a private header. Move these prototypes into a common header so that block drivers can directly use these APIs. Reviewed-by: Hannes Reinecke Signed-off-by: Nilay Shroff --- block/blk-stat.h | 4 ---- include/linux/blk-mq.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/blk-stat.h b/block/blk-stat.h index 9e05bf18d1be..f5d95dd8c0e9 100644 --- a/block/blk-stat.h +++ b/block/blk-stat.h @@ -67,10 +67,6 @@ void blk_free_queue_stats(struct blk_queue_stats *); void blk_stat_add(struct request *rq, u64 now); -/* record time/size info in request but not add a callback */ -void blk_stat_enable_accounting(struct request_queue *q); -void blk_stat_disable_accounting(struct request_queue *q); - /** * blk_stat_alloc_callback() - Allocate a block statistics callback. * @timer_fn: Timer callback function. diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index b25d12545f46..f647444643b8 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -735,6 +735,10 @@ int blk_rq_poll(struct request *rq, struct io_comp_batch *iob, bool blk_mq_queue_inflight(struct request_queue *q); +/* record time/size info in request but not add a callback */ +void blk_stat_enable_accounting(struct request_queue *q); +void blk_stat_disable_accounting(struct request_queue *q); + enum { /* return when out of requests */ BLK_MQ_REQ_NOWAIT = (__force blk_mq_req_flags_t)(1 << 0), -- 2.51.0