Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1869324lql; Wed, 13 Mar 2024 10:16:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVemt/o7Rj5+GhMsRh/APZHb5NPbR6t6qFmznb9BM+exhZl+1CKEgmlJamDbIRY9sFpz1NbZOJAthRooTgBuWUIe2xJxrUVu/nqazb3Sw== X-Google-Smtp-Source: AGHT+IEIFd4a3YZd0yuwKuhb1nx0b/7ThM5OLypX5Ffk+zq/QIrv3gzCuWzrIfwThWBGDeUNSMGH X-Received: by 2002:ac8:7dc4:0:b0:42e:e9a2:4495 with SMTP id c4-20020ac87dc4000000b0042ee9a24495mr5933333qte.22.1710350169753; Wed, 13 Mar 2024 10:16:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710350169; cv=pass; d=google.com; s=arc-20160816; b=pf6DduVFDCyJzgPgTCEtYNx6R+vakwcPEz6QEbITXtH1gtHlOIsSQq7tHQucAq7rys YVz5jnzxG4iY+MUds1PUW5+eopzHOkj9X+yTrrvkcU3ushz2+OIw+kPO5WnIMAU1paG3 g8XKzv/dPLCc3O3yYWpYMUFIf8/SH9PIA5xKhXgv94tAEqqEd8+M8UAvaZyHeb6ZCXZx +DGXB+E7QkUdU+Bk5Px2kimNdrtItTswQ4O67d8aio4ynx20A1HG7vYtqYzDbZPJcMs8 p91iTa7Ttmm/zWakdIuUV3xaOCj3I0zMhVWZBz8iUhoq+SdEbLKJCrT+gOi2iPXZ0YMG 2opQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=EXxDxLKYvDuTxqoxay7M4YY9+D9W7T7tUxfPzmgh8Po=; fh=xCzL2+ajmpYXMHKN9yMVnSWUGS21d3i9QCj6H/6gaSg=; b=lwRdvYLI7jtyx5dLF9TRRTqGakdWsJgmkLhXbPZP6cn2mOjKx8/OSJ3U9u1YPxqQry 2Bs5NyXJEb5Mo9CgYJQvgQTXt0YSxzV8buvjYE03bF2NWWVDneWj6C/DMpJLXJdOOfPQ AeVU0Oso7dxua2UJvjCOjXu2IY35Csz6XPfgR6+BjOre3LlgoY0TwfWt7uA0uChznDyr 0JwrKBm0pYtBKnzNi3rJfeaiBrz04UAdKOTS2r3uDe76AdKUM6KzuWNKzbVln3s+v+BP g30yMCOParu6JWPRlQ0cewF8XdBbg0WEiizN21l3nOwivDjzlzplMAbGGcJO6Cz9tAbR BWjw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oFWMwYJA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101922-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101922-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 12-20020ac8574c000000b0042f28e60aebsi10353901qtx.106.2024.03.13.10.16.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 10:16:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101922-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oFWMwYJA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101922-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101922-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 724FB1C21AA8 for ; Wed, 13 Mar 2024 17:16:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63A6A12C537; Wed, 13 Mar 2024 16:41:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oFWMwYJA" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8644B12BF2D; Wed, 13 Mar 2024 16:41:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710348063; cv=none; b=f/XVcq8CC1vqrzPOBitZZBgwRyWSdKvsclU2gNIKm7n9K4KfEJCmSF8UgkG9aaQGRiyWxMO3OPFMe4ckD4z9WC6Tj+TW9rnxbQbKK/q08R0Bm1agcXuxWwVMCyzJtgsu2oCK/tlSA+IycJ4eV9KQ/qoi0RyTTymPGgVXexDT6Vk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710348063; c=relaxed/simple; bh=qyYMg1voX87ZOIy7J2Hx7EeoBLpGryqBylptNPu1ZyM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UYNxcCYF4STk8yfWBUHaPcin6dcdZrUiQyOnVE/lZ9uRUN4tvBCDN9bKemCaP25TjqyjOM0ToTI1gZc/s2iI9zG09MUeKGGflou3udSE0vgWomBL/IOtBNYAkOzMjEEN0vxcDSCe3ZVxKmgh9fpZYzfxQRQANC+kQk3xoqQjdVs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oFWMwYJA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B588C43390; Wed, 13 Mar 2024 16:41:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710348063; bh=qyYMg1voX87ZOIy7J2Hx7EeoBLpGryqBylptNPu1ZyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oFWMwYJAlToEoE33GcnFHNrpI37iMEegEExUZMrxcgBe5yadRBa9IBNjgH7bneycY UrO4SfMcyFgW5S7TKbeou6nXUNlpPWHll7Xr37t1Qa5tNL4zF6iYR974FMEnExk1pP 6cFpQBidv69QWbTX0t/c/K1LWFcUEOeNL01C/3Qe3tFjAvPhYM3MmA6iHt3D5jdHVR VSO4yEAE0aPc8qG1iZw/sJ+km8eenhdH6Dn/Ind8kgXz5i7iWDzrERcEFflNynZw2p hJFwHylqrU0q3y4xfE2r9cWhoSIPH51KCHnyqEsv9Z83BVPuEYo4Uj9rJEIyeaH/yZ EDg0TMUdVbHYg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christoph Hellwig , Andreas Herrmann , Tejun Heo , Jens Axboe , Sasha Levin Subject: [PATCH 6.1 54/71] blk-wbt: pass a gendisk to wbt_init Date: Wed, 13 Mar 2024 12:39:40 -0400 Message-ID: <20240313163957.615276-55-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313163957.615276-1-sashal@kernel.org> References: <20240313163957.615276-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.82-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-6.1.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 6.1.82-rc1 X-KernelTest-Deadline: 2024-03-15T16:39+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Christoph Hellwig [ Upstream commit 958f29654747a54f2272eb478e493eb97f492e06 ] Pass a gendisk to wbt_init to prepare for phasing out usage of the request_queue in the blk-cgroup code. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-10-hch@lst.de Signed-off-by: Jens Axboe Stable-dep-of: f814bdda774c ("blk-wbt: Fix detection of dirty-throttled tasks") Signed-off-by: Sasha Levin --- block/blk-sysfs.c | 2 +- block/blk-wbt.c | 5 +++-- block/blk-wbt.h | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index c59c4d3ee7a27..31f53ef01982d 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -488,7 +488,7 @@ static ssize_t queue_wb_lat_store(struct request_queue *q, const char *page, rqos = wbt_rq_qos(q); if (!rqos) { - ret = wbt_init(q); + ret = wbt_init(q->disk); if (ret) return ret; } diff --git a/block/blk-wbt.c b/block/blk-wbt.c index 8d4f075f13e2f..95bec9244e9f3 100644 --- a/block/blk-wbt.c +++ b/block/blk-wbt.c @@ -658,7 +658,7 @@ void wbt_enable_default(struct gendisk *disk) return; if (queue_is_mq(q) && !disable_flag) - wbt_init(q); + wbt_init(disk); } EXPORT_SYMBOL_GPL(wbt_enable_default); @@ -822,8 +822,9 @@ static struct rq_qos_ops wbt_rqos_ops = { #endif }; -int wbt_init(struct request_queue *q) +int wbt_init(struct gendisk *disk) { + struct request_queue *q = disk->queue; struct rq_wb *rwb; int i; int ret; diff --git a/block/blk-wbt.h b/block/blk-wbt.h index 58c226fe33d48..8170439b89d6e 100644 --- a/block/blk-wbt.h +++ b/block/blk-wbt.h @@ -88,7 +88,7 @@ static inline unsigned int wbt_inflight(struct rq_wb *rwb) #ifdef CONFIG_BLK_WBT -int wbt_init(struct request_queue *); +int wbt_init(struct gendisk *disk); void wbt_disable_default(struct gendisk *disk); void wbt_enable_default(struct gendisk *disk); @@ -101,7 +101,7 @@ u64 wbt_default_latency_nsec(struct request_queue *); #else -static inline int wbt_init(struct request_queue *q) +static inline int wbt_init(struct gendisk *disk) { return -EINVAL; } -- 2.43.0