Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3444243imw; Thu, 7 Jul 2022 01:43:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uZq0+vo3dUDZjrGJ7C4Ynlc44e3L90QfTMC8Kl1/wIMgJbxEQ+uXpR9BQ8LrczREjBU1Sr X-Received: by 2002:a05:6402:298b:b0:435:20fd:d65d with SMTP id eq11-20020a056402298b00b0043520fdd65dmr60618744edb.190.1657183411105; Thu, 07 Jul 2022 01:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657183411; cv=none; d=google.com; s=arc-20160816; b=cYCgWhPoe/Doo2FlvyErw1D87x6Y+Jmk3+kjaFWyf0Mi8EoLFRjFhpwkGuKsReZ2Sa DuoXR5/CeTCtorq1/FAHV2Vk1ExPbt1J/r8TkXkKLWqO5pEmhf5UWcvsdGgRYNJsST8M kx8KH9G9B1pGtAqj/EWqw3COiZRidHcb9iblcP7Izx8QwCXKrYGeJJU75zqcmOP5oVFR Vx2RhozqtaTFR7zFySg5WapmGaQ+SQTFeKVaaQB2gNBUwC4Uo/Kg0XBiRJWklAplzEzI SBdMIo7/zoPUd58/C4QH0uz6vsG9kjyMURjhkRVKvrtYBDHZHn7iQpjRvmXnRTBPQLKG DAkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=9JTT03ywMrfFf8Wc1PmkKBuL5TV4H/+eK+u9HUsy8r8=; b=wPGS2BEAncNd2TZu/qtb0o0J05SlZEzQHOwGScdY/tajht0+i7GxtRGCkFqJ07kAbS KEWyWTvyESs50x7lpXIBkYhj4U+ouOqhnMxOjbDPT99850oix3Obn80WRh5XtxcOMbok 3wabQhDRFlGVywFou1jvRxaycP5rv51L5MnErnplRK1I4KTPZS0ZKLo5RJHZyoGxuApz DNoic53zzOX3wv1+7NspGsLab9D1peTaK/JgTij39rNH5Avi+AMJ114BAkySJfKtxmlk m8573gERoPq6NNio21JUGP7s2ZzzB5bWHAhAtuy3jC1ArTvhwJNJQqPRDTj07D97WDaa YcQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@veeam.com header.s=mx4-2022 header.b=FWo545DE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=veeam.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm25-20020a05640222d900b0043a9602cb14si768446edb.385.2022.07.07.01.43.06; Thu, 07 Jul 2022 01:43:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@veeam.com header.s=mx4-2022 header.b=FWo545DE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=veeam.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235222AbiGGI1m (ORCPT + 99 others); Thu, 7 Jul 2022 04:27:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235399AbiGGI1X (ORCPT ); Thu, 7 Jul 2022 04:27:23 -0400 Received: from mx4.veeam.com (mx4.veeam.com [104.41.138.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 144F414D21; Thu, 7 Jul 2022 01:27:20 -0700 (PDT) Received: from usmail.veeam.com (colmbx01.amust.local [172.18.0.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx4.veeam.com (Postfix) with ESMTPS id 410621BED3; Thu, 7 Jul 2022 11:27:18 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veeam.com; s=mx4-2022; t=1657182438; bh=9JTT03ywMrfFf8Wc1PmkKBuL5TV4H/+eK+u9HUsy8r8=; h=Date:Subject:To:CC:References:From:In-Reply-To:From; b=FWo545DE5ALoyzMmYKIG4JrOpsupyPySRmzVtTD+ZHL/Eqqur+HEZoVW5js8jjfQa QcBfkDawEv48Y3RrDaynRVzEjyygp807vwzp1YhVTq1JVlTb4COUgUGDu8XSi5wwAR dNF15T3fhtuxSqS/66FTUgki5h+CdJdywgMTo8M5X3rsMSq7HtiVauVa/I40w++dZt ZVMlnTLnUfHtgERxoXpkjaRlXTC2go3Qxlt+bA+8HRHvoe28lc6uOhXxEWMIIrdnUF R5xKVpCnzsUcSMcxA5pJ5rTxfnV0sXk9ejtPuHd7nNCXVRSOP3fJIgJG9jcQVYQ0C8 /XwZJ3y0eIfNA== Received: from [172.24.11.83] (172.24.11.83) by colmbx01.amust.local (172.18.0.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.9; Thu, 7 Jul 2022 04:26:56 -0400 Message-ID: Date: Thu, 7 Jul 2022 10:26:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 01/20] block, blk_filter: enable block device filters Content-Language: en-US To: Christoph Hellwig CC: "axboe@kernel.dk" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <1655135593-1900-1-git-send-email-sergei.shtepa@veeam.com> <1655135593-1900-2-git-send-email-sergei.shtepa@veeam.com> From: Sergei Shtepa In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.24.11.83] X-ClientProxiedBy: prgmbx02.amust.local (172.24.128.103) To colmbx01.amust.local (172.18.0.171) X-EsetResult: clean, is OK X-EsetId: 37303A29078F7554657267 X-Veeam-MMEX: True X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thank you, Christoph, for your attention to the patch. I am preparing the next version of the patch. In it, I planned to simplify the bdev_filer code. I will make changes in it, in accordance with your comments, and will add your code and check it on my test labs. But I'm not sure if using the blk_mq_freeze_queue() is appropriate. If I understood the code correctly, it is based on the expectation that the counter q->q_usage_counter will decrease to zero. To increase it, a blk_queue_enter() is used. And at the time of calling the filter_bio() in the submit_bio_noacct(), this counter has not yet been increased. I will double check this and try to get rid of the bdev->bd_filter_lock.