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 X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBAE1C433DB for ; Mon, 15 Mar 2021 12:06:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7610B64E41 for ; Mon, 15 Mar 2021 12:06:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230171AbhCOMGX (ORCPT ); Mon, 15 Mar 2021 08:06:23 -0400 Received: from mx4.veeam.com ([104.41.138.86]:50584 "EHLO mx4.veeam.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230169AbhCOMGX (ORCPT ); Mon, 15 Mar 2021 08:06:23 -0400 Received: from mail.veeam.com (prgmbx01.amust.local [172.24.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 32402171E; Mon, 15 Mar 2021 15:06:18 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veeam.com; s=mx4; t=1615809978; bh=mVn36BTSzFhaZLEUHYffL8xe3v6UOYz/YXSHVjys07s=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=gFh+ULS+jNH0u4XnkuWd8sf+8rvbY99vFfRjjm4mDEf6PHHBD3hbXQdcJTXrWousR kvi9VzOitKCEQcZacJvCpfiUJC65HMpxP2Rqln8k33a+IdaAGwD5jnjfs0Yajxl/87 VqqUvn6sP+9xGhzKK9yp89S4zV2dW0RQ71xl/o6o= Received: from veeam.com (172.24.14.5) by prgmbx01.amust.local (172.24.0.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.721.2; Mon, 15 Mar 2021 13:06:16 +0100 Date: Mon, 15 Mar 2021 15:06:08 +0300 From: Sergei Shtepa To: Christoph Hellwig CC: Mike Snitzer , Alasdair Kergon , Hannes Reinecke , Jens Axboe , "dm-devel@redhat.com" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-api@vger.kernel.org" , Pavel Tide Subject: Re: [PATCH v7 1/3] block: add blk_mq_is_queue_frozen() Message-ID: <20210315120608.GA30489@veeam.com> References: <1615563895-28565-1-git-send-email-sergei.shtepa@veeam.com> <1615563895-28565-2-git-send-email-sergei.shtepa@veeam.com> <20210312190641.GA2550@redhat.com> <20210314091441.GA3773360@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20210314091441.GA3773360@infradead.org> X-Originating-IP: [172.24.14.5] X-ClientProxiedBy: prgmbx01.amust.local (172.24.0.171) To prgmbx01.amust.local (172.24.0.171) X-EsetResult: clean, is OK X-EsetId: 37303A29D2A50B58627C62 X-Veeam-MMEX: True Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org The 03/14/2021 12:14, Christoph Hellwig wrote: > On Fri, Mar 12, 2021 at 02:06:41PM -0500, Mike Snitzer wrote: > > This is returning a frozen state that is immediately stale. I don't > > think any code calling this is providing the guarantees you think it > > does due to the racey nature of this state once the mutex is dropped. > > The code only uses it for asserts in the form of WARN_ONs. But perhaps it is possible to come up with a more elegant solution? I'll think about it. -- Sergei Shtepa Veeam Software developer. 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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDE50C433DB for ; Mon, 15 Mar 2021 12:34:40 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 312AB64E86 for ; Mon, 15 Mar 2021 12:34:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 312AB64E86 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=veeam.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-557-sOU9wgV8N9ay_tF4yYRazw-1; Mon, 15 Mar 2021 08:34:36 -0400 X-MC-Unique: sOU9wgV8N9ay_tF4yYRazw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 75E1C100C61C; Mon, 15 Mar 2021 12:34:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D4D455D9C0; Mon, 15 Mar 2021 12:34:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 89C741832DF7; Mon, 15 Mar 2021 12:34:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12FC6OOi025823 for ; Mon, 15 Mar 2021 08:06:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id C2C401111C87; Mon, 15 Mar 2021 12:06:24 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BEB321111C86 for ; Mon, 15 Mar 2021 12:06:22 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3E07B800B30 for ; Mon, 15 Mar 2021 12:06:22 +0000 (UTC) Received: from mx4.veeam.com (mx4.veeam.com [104.41.138.86]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-237-7OEh6qQgMQCx1DbjSLZgcQ-1; Mon, 15 Mar 2021 08:06:20 -0400 X-MC-Unique: 7OEh6qQgMQCx1DbjSLZgcQ-1 Received: from mail.veeam.com (prgmbx01.amust.local [172.24.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 32402171E; Mon, 15 Mar 2021 15:06:18 +0300 (MSK) Received: from veeam.com (172.24.14.5) by prgmbx01.amust.local (172.24.0.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.721.2; Mon, 15 Mar 2021 13:06:16 +0100 Date: Mon, 15 Mar 2021 15:06:08 +0300 From: Sergei Shtepa To: Christoph Hellwig Message-ID: <20210315120608.GA30489@veeam.com> References: <1615563895-28565-1-git-send-email-sergei.shtepa@veeam.com> <1615563895-28565-2-git-send-email-sergei.shtepa@veeam.com> <20210312190641.GA2550@redhat.com> <20210314091441.GA3773360@infradead.org> MIME-Version: 1.0 In-Reply-To: <20210314091441.GA3773360@infradead.org> X-Originating-IP: [172.24.14.5] X-ClientProxiedBy: prgmbx01.amust.local (172.24.0.171) To prgmbx01.amust.local (172.24.0.171) X-EsetResult: clean, is OK X-EsetId: 37303A29D2A50B58627C62 X-Veeam-MMEX: True X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: dm-devel@redhat.com Cc: Jens Axboe , Mike Snitzer , "linux-api@vger.kernel.org" , Pavel Tide , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "dm-devel@redhat.com" , Alasdair Kergon Subject: Re: [dm-devel] [PATCH v7 1/3] block: add blk_mq_is_queue_frozen() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit The 03/14/2021 12:14, Christoph Hellwig wrote: > On Fri, Mar 12, 2021 at 02:06:41PM -0500, Mike Snitzer wrote: > > This is returning a frozen state that is immediately stale. I don't > > think any code calling this is providing the guarantees you think it > > does due to the racey nature of this state once the mutex is dropped. > > The code only uses it for asserts in the form of WARN_ONs. But perhaps it is possible to come up with a more elegant solution? I'll think about it. -- Sergei Shtepa Veeam Software developer. -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel