From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id A91EF80D23 for ; Tue, 27 Oct 2026 14:25:34 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69REONYg028559; Tue, 27 Oct 2026 17:24:23 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69REONYg028559 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="G3joAKES" Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69REO21R028505 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 27 Oct 2026 17:24:03 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69REO21R028505 Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-3ac0ae43900so4074990a91.0 for ; Tue, 27 Oct 2026 07:24:03 -0700 (PDT) X-Gm-Message-State: AFq9FYJUTOmXs1dW1HPufCTaAVGr6rjSbwrEWcDGmYyozS/wIjVoDMmq gteXTKQ4TWVZ7bqNjSk7d822cdoXpxQkaNkUxTcWd46dZq3VEUG/aXaEaOyRf/vCMt3lPelI0su G+sDRCgv+WilphWtkreDUM2ELI80VVE4Qj/YYD0HGmmULZomEeBI1ZQ== X-Gm-Gg: AYBFou3oKExl055f8j1Vk7TZ2QzQ+EiGvSRuwxw0vhdB6j2zn/zFpsSgMuvw8ocBAIf qQ/rBcnjtmQTuo7rwPi1ooxs4G9qLbM39tGaZgRknBzAYKANwz/DEFu6LW3YnzIFAWChFuX0v9i a/Zf5sJR6TEk8V+SMGP5YdtEOV3pE9J+sBSDMb440aZ5gTYW/yFPH6jWKgjxHb7YocIkhr8Zpv0 Y9aVclidjZsRkGzKt9nw6YuRBBt28VIu7XmQl6Ygz5ssWqo/Pa3vX4iPSFMT8z/jrBLAuJCbjTs QAZCRDgqU6hZPhR/n3ksnnPlCmzCQGNspcfdNWE9QARPc7SVoWG+QMpsfNaT+7W5r85xCAUqFV4 OZ6V6+S6rp0ca/h6c/vZ8oACtU7XPEWirJu859QBa/LA+SBvV/oP7oEYbmtXe1YuGm0YeZtXWDN b0dx032K0/t6iQoeXzNNogJdXN X-Received: by 2002:a05:6a20:119d:b0:3e8:b7fd:6273 with SMTP id adf61e73a8af0-3e8b7fdb189mr4731655637.25.1793111041961; Tue, 27 Oct 2026 07:24:01 -0700 (PDT) X-Received: by 2002:a05:6a20:119d:b0:3e8:b7fd:6273 with SMTP id adf61e73a8af0-3e8b7fdb189mr4731635637.25.1793111041010; Tue, 27 Oct 2026 07:24:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1793111041; cv=pass; d=google.com; s=arc-20260327; b=sNWW0IbhzHXcGMrDLqZrNtb9KDzIEQ14Uqc2c9VZ4hhBcG7OkVV2O/mQ+F7pUWcTUT +yRFfdiI5DKoN2FkoY4YNnlVtpMi5JbD3yjBbkOMz6dVdr765WyLhq4dk0umAY1IyR3a HkAJAGryUy0awJ3Gsny8JDFqoCwD2DkD4k/yyAJTWIgeZfgn8aiW8bgthyvqv3YTOocc Q68Q4sw9fuF/EU4pNtE2CtJVUrnZoa5V4QhBu3Q7pSR3NdkycADxajvhBLg3WeRVlOiG lOqB17d3IkxACiJ8R25g768ev4m8AYpLP2ZaG8RAG1e6f2oZ6RVQWDl0rmqxw9NxZejH RPyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=mime-version:cc:to:in-reply-to:references:message-id :content-transfer-encoding:subject:date:from:dkim-signature; bh=wKMzkBPEKlNGH/Z33xXZX70beZD2ETXcnhUWADEp0Lg=; fh=y3TfVeQA9QYtIzD5Inxiyys5ebBfyOgjQPZaP/+mSiI=; b=l9uJ71VOQj91PtGxAeKl0lVFU1pYAvdCnMfmRTV2oxtiuqRhheMV6CSkH+jCJZlJBM RPfBwCmtvfUgizIohhv55kubrURRnZhQbqz2lpkHYtV+PaF/L+5ufE/xRMHOs3fQ8LnB 4p7VCBHRAm4F815dmsaP29d3V9jPHsMkLZGPxmJSG2STtGdTTWLUQWNeorZ9Lt+fZJ1Y dwSzJlLT43hYHr4Ayl/OL19WNKoJw7utnlCxJ7PcJQqS6GOwfYhE0HpsLUdoK9R8lmw9 77V3imbE3EPGnJPV7jze16g2Im9VRRHYsFq7NGa7zCWwN4jyGHwZJxyPZrOd8e/GCUZJ nImw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector2 header.b=G3joAKES; arc=pass (i=1 spf=pass spfdomain=virtuozzo.com dkim=pass dkdomain=virtuozzo.com dmarc=pass fromdomain=virtuozzo.com); spf=pass (google.com: domain of ptikhomirov@virtuozzo.com designates 2a01:111:f403:c201::3 as permitted sender) smtp.mailfrom=ptikhomirov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazlp170110003.outbound.protection.outlook.com. [2a01:111:f403:c201::3]) by mx.google.com with ESMTPS id 41be03b00d2f7-cd8ccd0fb41si12944089a12.304.2026.10.27.07.24.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2026 07:24:01 -0700 (PDT) Received-SPF: pass (google.com: domain of ptikhomirov@virtuozzo.com designates 2a01:111:f403:c201::3 as permitted sender) client-ip=2a01:111:f403:c201::3; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector2 header.b=G3joAKES; arc=pass (i=1 spf=pass spfdomain=virtuozzo.com dkim=pass dkdomain=virtuozzo.com dmarc=pass fromdomain=virtuozzo.com); spf=pass (google.com: domain of ptikhomirov@virtuozzo.com designates 2a01:111:f403:c201::3 as permitted sender) smtp.mailfrom=ptikhomirov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QdtVymtHeYApvZn+eLNiAP2yk1GIg3MIyzhsZepxgihMl4OHoWbeFk+WJqNNIQeWLX+8t4VI3bBvWHY9dWykOeVVcRLc6IXoyGToi14X9/Wrany35MckkJV9TPIxFpADwlde0Iyuz3friie6+BimPp2qzxCmW8MpbilOnMwJEte+OEq4e2kc9ZeIqNOzgpG94qUWYs+s3hMzZ4ud2htkLLXeIFzUc9w0WA++N3+Zmiqb3Dgfu5bq0h2zNPEx480HBFXkwNeVUpaPXTnx31INVID23oDCy7wnq3iXZbq55BoFgWwOxaDXimifQaUJGAA9LPwTuduxmcrPE3xDMYnztA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wKMzkBPEKlNGH/Z33xXZX70beZD2ETXcnhUWADEp0Lg=; b=eIY14JhQU47+HfPIfq5pNdBNRvDaK2+lzBWmg3Ep+yJWrEXfzTeS8IXCdmjZk27IE8GXeKR3uaW1gMLnfu/hwAO5cyjSqu7ZDBMBu5qCfMo4LhExtrjohRzU+cHsN3a0VBmrvN+7cdwaQCssaXKZI9O6+t6rtT4oZSnZD0Gg0QxiqjEcuQZ+QfwX2Xfunf7uQ8gh6Ly7sCAlZGmjnP4QMdnZt/sO/Q9wHdwiO5VWav3r4e37rtz4jKfZVkarjZVYqun2nnpudARzjJHFdHjZr4pkyT3AqowV6O1Yhg2wPnMjxgu0OjTtqwAAmMR7yTWdqsBBYRzaAkIJFqW3l4i+hQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wKMzkBPEKlNGH/Z33xXZX70beZD2ETXcnhUWADEp0Lg=; b=G3joAKESz5B3jaSS2mRxjhNV7wOYHeGpoLsrQ2CwaiR6jC4Omrhx0pYNL2lw3MK7eQz2tSNeoDH8LOM5A1xuW0dzIluu68dTb20gAYtFSUZ739/52rfya6xCUOHUbAht/GPKRVbMHMbie74EfeePQDG6ZueykHhgDgNy65b9a8yRWgflMYr5mEvyEv+11gIk2D/yPq+UEtBXVpXeZwTYP0MEL2fV8LsIkRhpAsqZEGob7imnh7r3Jn+1/WxH+uLJzfbedXiIYQyK7/cAHVL1uDdygw6o/xtbqCP1mUYXAMYo/qxSW9uQaBjBdlS8xNnZXU+WSBaVKIfUqx6s7ThkBA== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; Received: from AM0PR08MB11804.eurprd08.prod.outlook.com (2603:10a6:20b:747::14) by MIWPR08MB089781.eurprd08.prod.outlook.com (2603:10a6:290:ab::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.546.22; Tue, 27 Oct 2026 14:23:57 +0000 Received: from AM0PR08MB11804.eurprd08.prod.outlook.com ([fe80::bf46:f137:f6d2:5b3a]) by AM0PR08MB11804.eurprd08.prod.outlook.com ([fe80::bf46:f137:f6d2:5b3a%7]) with mapi id 15.21.0546.021; Tue, 27 Oct 2026 14:23:57 +0000 From: Pavel Tikhomirov Date: Tue, 27 Oct 2026 15:23:52 +0100 Message-Id: <20261027-ptikhomirov-vstor-149268-cbt-account-at-rq-start-v5-5-88dccc74b48b@virtuozzo.com> References: <20261027-ptikhomirov-vstor-149268-cbt-account-at-rq-start-v5-0-88dccc74b48b@virtuozzo.com> In-Reply-To: <20261027-ptikhomirov-vstor-149268-cbt-account-at-rq-start-v5-0-88dccc74b48b@virtuozzo.com> To: Konstantin Khorenko X-Mailer: b4 0.16.0 X-ClientProxiedBy: BE1P281CA0323.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:87::8) To AM0PR08MB11804.eurprd08.prod.outlook.com (2603:10a6:20b:747::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR08MB11804:EE_|MIWPR08MB089781:EE_ X-MS-Office365-Filtering-Correlation-Id: 728dd7bd-f63b-404e-f912-08df3435efa5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|23010399003|366016|10070799003|1800799024|52116014|376014|56012099006|261026140227099003|22082099003|18002099003|10067099003|261021121427099003|261021123027099003|261009223027099003|261022105027099003|261026121527099003|260925021311599003|260925022911599003|260925021911599003; X-Microsoft-Antispam-Message-Info: YxbXS90gHxex92EDnF5Tua5eaAwMlwz7vaMPT2i0K489JCQEV6ro9nvi1aDAClnxaapN0ukJam7CZZHafB6EI9xgtyXwPg/Z6x6v/G0+vBdty7ITMVGUxHpDi3uqxr9rfsMYa1KFSKLswh0GhoYPY5ZzzPpnztRukAe3nS3Ezppg7WOWkIqkuAKx8vfvzKtsJYh3TgZw/2mLxcm1DgIDWMIhml1RF/+u2IKObMuplFHo37sAsT6v6XbcjI1xUv5IKEhrP+68rEOzwWggjNLTOL++Ysw/Gd+6iF4wXwvI2p/0UbwJW7ghIYHjPP+o3RJOl3Ir5BkimwGRJ+vhrK5WIqjjuMICghdajnrATt+9sEP9OMIt2RyNbevyUX0Bc4ya+pxbnEOesH0t8gFTruTiBFASfjkIzcIN6zk4z5k4mfak+b1HnZScURG//XkBNOkBN1vtuGxLGZoPszyndwk6GW9fuwN11gNRw+4fFNr/T7hUiLndyurgbc3cLcd5yQK9OOjUPXxb3AR3+3YrofROP9MyvNa7q0+EWE8JjPUSEDC3srPr3aHZT7Y0te2njCMSeDP3hBUdJCPgeZqR/06YxRWeY6OA+1A8NDj7fLWxTFRrPOCPZqI3nPzS2bipp9f8 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR08MB11804.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(23010399003)(366016)(10070799003)(1800799024)(52116014)(376014)(56012099006)(261026140227099003)(22082099003)(18002099003)(10067099003)(261021121427099003)(261021123027099003)(261009223027099003)(261022105027099003)(261026121527099003)(260925021311599003)(260925022911599003)(260925021911599003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 2 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T0hHTG9iemdXNkt0cnV4Ym9DTytkby9vZkN6NURvNWN4RFJYUVNmbW9yNC8r?= =?utf-8?B?YmZFb3lWUlVEak9URWVYTzJOY3BzeVNhMmNTckM3N0VCWHhydmxEaFkzenVC?= =?utf-8?B?MFd4a0F0SVBFSDBUNDAyOU9NZkpvTFprV1NSbjNvVlVKemxNL205aG1ndFJU?= =?utf-8?B?SERJUlF2VUM2d0RVVExwcXFLNXFVeXlja1hlbDcwcDF2U0ZnN01YL1FMNFNI?= =?utf-8?B?Vkdqb1NBdWxVOHozYjZwVlh6ZCs4RHM1S2Vob0lkQ05nWjNZK3c3L2ZQRjdB?= =?utf-8?B?cGs2Vll4T2lybGpTR3pMMDQwRmtVdUJuWStLYmZSL1cwYlBpTiswWk9FaWNh?= =?utf-8?B?VUJSSlJKRkZVVlRnSldDR1llR3dLQmdmMmVsZ1pvUXRISXhxQ0M5Z01UTVU4?= =?utf-8?B?NjBQYmVaOThER0Z2ajhPeU9ZclpXU3pKRnJESkZ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TExtbVBBVFl0ZWF1VTZqcDJJRkdLaUlMbFRTK1pWZHFGd2M4RWlHZk1Ib09h?= =?utf-8?B?ZDNCemRPNWhVdXBpZHdsdVdvWi9sdi9UVGx0VWJaRkNCRUdoOUNNaVdkN0s4?= =?utf-8?Q?ZZUoojMeeLKFce/yWLg3yYfVpHpFo5EwoULpUvqjEcpgE?= X-MS-Exchange-AntiSpam-MessageData-1: 7xKivVrLL5zWXh10N4V1UQKvdlIGsW1tnHQ= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 728dd7bd-f63b-404e-f912-08df3435efa5 X-MS-Exchange-CrossTenant-AuthSource: AM0PR08MB11804.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2026 14:23:56.8998 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: r+y5EcPJg6jEfYu7d6FGeN1iKEbsH3koqYrYoImaT11zVzGfVijvoC9B1ffMa9ML6LVGDSfCerLsu/arnoy1iCcDSoiLW0gKzlO+0Sa26YE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MIWPR08MB089781 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v5 5/6] block/blk-cbt: don't sleep in CBT for a REQ_NOWAIT write X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org Accounting a write in CBT may allocate a bitmap page with GFP_NOIO, either for the write itself or for the extent it evicts from the per-cpu cache, so a REQ_NOWAIT bio can sleep in submit_bio_noacct(). For a REQ_NOWAIT write, skip the cache and set the bits directly, which doesn't allocate when all the pages are there. If one is missing, fail the bio with BLK_STS_AGAIN, for the submitter to retry it in a context that may block. The throttle dispatch work may sleep, so it doesn't use this. https://virtuozzo.atlassian.net/browse/VSTOR-149268 Feature: cbt: changed block tracking (for backup) Signed-off-by: Pavel Tikhomirov --- block/blk-cbt.c | 52 +++++++++++++++++++++++++++++++++++++++++++------- block/blk-core.c | 5 ++++- block/blk-throttle.c | 2 +- include/linux/blkdev.h | 7 +++++-- 4 files changed, 55 insertions(+), 11 deletions(-) diff --git a/block/blk-cbt.c b/block/blk-cbt.c index c87c7624f3800..7636602398d1d 100644 --- a/block/blk-cbt.c +++ b/block/blk-cbt.c @@ -230,26 +230,52 @@ static int __blk_cbt_set(struct cbt_info *cbt, blkcnt_t block, return (pages_missed && *pages_missed) ? -EAGAIN : 0; } -static void blk_cbt_add(struct cbt_info *cbt, blkcnt_t start, blkcnt_t len) +/* Return true if all the map pages for [block, block + count) are there */ +static bool cbt_pages_present(struct cbt_info *cbt, blkcnt_t block, + blkcnt_t count) +{ + unsigned long idx, last; + + if (unlikely(!count || block + count > cbt->block_max)) + return true; + + last = (block + count - 1) / BITS_PER_PAGE; + for (idx = block / BITS_PER_PAGE; idx <= last; idx++) + if (!CBT_PAGE(cbt, idx)) + return false; + + return true; +} + +/* Return true if nowait and a bitmap page is missing */ +static bool blk_cbt_add(struct cbt_info *cbt, blkcnt_t start, blkcnt_t len, + bool nowait) { struct cbt_extent *ex; struct cbt_extent old; blkcnt_t end; if (unlikely(test_bit(CBT_ERROR, &cbt->flags))) - return; + return false; end = DIV_ROUND_UP(start + len, 1UL << cbt->block_bits); start >>= cbt->block_bits; len = end - start; + if (unlikely(nowait)) { + /* Don't sleep: set the bits directly, only with all pages there */ + if (!cbt_pages_present(cbt, start, len)) + return true; + __blk_cbt_set(cbt, start, len, 1, NULL, NULL); + return false; + } if (unlikely(test_bit(CBT_NOCACHE, &cbt->flags))) { __blk_cbt_set(cbt, start, len, 1, NULL, NULL); - return; + return false; } ex = get_cpu_ptr(cbt->cache); if (ex->start + ex->len == start) { ex->len += len; put_cpu_ptr(cbt->cache); - return; + return false; } old = *ex; ex->start = start; @@ -258,11 +284,17 @@ static void blk_cbt_add(struct cbt_info *cbt, blkcnt_t start, blkcnt_t len) if (likely(old.len)) __blk_cbt_set(cbt, old.start, old.len, 1, NULL, NULL); + return false; } -void blk_cbt_bio_queue(struct request_queue *q, struct bio *bio) +/* + * Account a write in CBT. With nowait, don't sleep: return true if a bitmap + * page is missing, for the caller to fail the bio with BLK_STS_AGAIN. + */ +bool blk_cbt_bio_queue(struct request_queue *q, struct bio *bio, bool nowait) { struct cbt_info *cbt; + bool wouldblock = false; int idx; idx = srcu_read_lock(&cbt_srcu); @@ -270,11 +302,17 @@ void blk_cbt_bio_queue(struct request_queue *q, struct bio *bio) goto out_srcu; list_for_each_entry_srcu(cbt, &q->cbt_list, list, - srcu_read_lock_held(&cbt_srcu)) - blk_cbt_add(cbt, bio->bi_iter.bi_sector << 9, bio->bi_iter.bi_size); + srcu_read_lock_held(&cbt_srcu)) { + if (blk_cbt_add(cbt, bio->bi_iter.bi_sector << 9, + bio->bi_iter.bi_size, nowait)) { + wouldblock = true; + break; + } + } out_srcu: srcu_read_unlock(&cbt_srcu, idx); + return wouldblock; } static struct cbt_info *do_cbt_alloc(struct request_queue *q, __u8 *name, diff --git a/block/blk-core.c b/block/blk-core.c index bcc3060de670c..6bc78f7c23d38 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -871,7 +871,10 @@ void submit_bio_noacct(struct bio *bio) if (blk_throtl_bio(bio)) return; - blk_cbt_bio_queue(q, bio); + if (blk_cbt_bio_queue(q, bio, bio->bi_opf & REQ_NOWAIT)) { + bio_wouldblock_error(bio); + return; + } submit_bio_noacct_nocheck(bio); return; diff --git a/block/blk-throttle.c b/block/blk-throttle.c index e1e008a30bf2c..00f0db0a57f8d 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -1225,7 +1225,7 @@ static void blk_throtl_dispatch_work_fn(struct work_struct *work) blk_start_plug(&plug); while ((bio = bio_list_pop(&bio_list_on_stack))) { /* submit_bio_noacct() did not account it in CBT */ - blk_cbt_bio_queue(q, bio); + blk_cbt_bio_queue(q, bio, false); submit_bio_noacct_nocheck(bio); } blk_finish_plug(&plug); diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1284bb0e4ebc0..885555f480462 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1626,7 +1626,8 @@ static inline bool blk_crypto_register(struct blk_crypto_profile *profile, #if defined (CONFIG_BLK_DEV_CBT) extern void blk_cbt_update_size(struct block_device *bdev); extern void blk_cbt_release(struct request_queue *q); -extern void blk_cbt_bio_queue(struct request_queue *q, struct bio *bio); +extern bool blk_cbt_bio_queue(struct request_queue *q, struct bio *bio, + bool nowait); extern int blk_cbt_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg); #else /* CONFIG_BLK_DEV_CBT */ static inline void blk_cbt_update_size(struct block_device *bdev) @@ -1635,8 +1636,10 @@ static inline void blk_cbt_update_size(struct block_device *bdev) static inline void blk_cbt_release(struct request_queue *q) { } -static inline void blk_cbt_bio_queue(struct request_queue *q, struct bio *bio) +static inline bool blk_cbt_bio_queue(struct request_queue *q, struct bio *bio, + bool nowait) { + return false; } static inline int blk_cbt_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg) -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel