From patchwork Fri Sep 2 22:42:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9311763 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9CBEC60772 for ; Fri, 2 Sep 2016 22:43:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93A892986E for ; Fri, 2 Sep 2016 22:43:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8829829870; Fri, 2 Sep 2016 22:43:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3804D2986E for ; Fri, 2 Sep 2016 22:43:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754070AbcIBWnW (ORCPT ); Fri, 2 Sep 2016 18:43:22 -0400 Received: from mail-by2nam03on0056.outbound.protection.outlook.com ([104.47.42.56]:11298 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754041AbcIBWnT (ORCPT ); Fri, 2 Sep 2016 18:43:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=T43GtLv9fYquHHpEy1lZVyVdc6qtKEC0NsIkDkaYgCw=; b=IyeEiHmTjQw2G4z0DrSg10Jlnxy+kBaZ/q7LhVqZvhibGsY7TQ+hnMfL7qwqBJuaVqdzC2QsoTETYGhbR4xrlUNW0rBsTD5hHzaG0hPaNCGC2QbeF+r1XSZl1m1CHXtQNyind3v6F4fJYpHIlwLMNaFXOG1yt9OzhKF7X7yVtZk= Received: from BN1PR02CA0035.namprd02.prod.outlook.com (10.141.56.35) by BLUPR02MB407.namprd02.prod.outlook.com (10.141.80.17) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.549.15; Fri, 2 Sep 2016 22:42:39 +0000 Received: from BN1AFFO11FD029.protection.gbl (2a01:111:f400:7c10::112) by BN1PR02CA0035.outlook.office365.com (2a01:111:e400:2a::35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9 via Frontend Transport; Fri, 2 Sep 2016 22:42:38 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by BN1AFFO11FD029.mail.protection.outlook.com (10.58.52.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.587.6 via Frontend Transport; Fri, 2 Sep 2016 22:42:37 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id C8.BF.61581.C8EF9C75; Fri, 2 Sep 2016 15:34:52 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.301.0; Fri, 2 Sep 2016 15:42:36 -0700 X-AuditID: 0ac94371-607ff7000000f08d-c8-57c9fe8c3ad7 Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 0F.8E.03606.9500AC75; Fri, 2 Sep 2016 15:42:36 -0700 (PDT) Subject: Re: [dm-devel] should blk-mq halt requeue processing while queue is frozen? To: Mike Snitzer References: <20160901204806.GA12742@redhat.com> <66e36ae7-19ff-058f-049a-3e91a62b19b3@sandisk.com> <20160901211718.GA12894@redhat.com> <20160901221823.GA13209@redhat.com> <20160901222654.GA13292@redhat.com> <938609b9-3a55-0ed3-ffeb-de27e1c1e864@sandisk.com> <20160901234754.GA13653@redhat.com> <6af010f8-0a8f-cf0e-d819-3b8e1c20b56e@sandisk.com> <20160902151213.GA17508@redhat.com> <20160902161059.GB17508@redhat.com> CC: , , "device-mapper development" , From: Bart Van Assche Message-ID: Date: Fri, 2 Sep 2016 15:42:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <20160902161059.GB17508@redhat.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPIsWRmVeSWpSXmKPExsXCddJ5kW7Pv5PhBs2rrS1W3+1ns9j7bjar xcrVR5ks9t7Stmjb+JXRgdXj8tlSj903G9g83u+7yubxeZNcAEsUl01Kak5mWWqRvl0CV8a0 aecYC9pNK26vPc3YwLhfp4uRk0NCwERi7e0eJhBbSGApk8SqT9pdjFxA9nZGiY3nljN3MXKA Fd37mwERX8oo8e1kGztIg7BAmMTzB31MIDUiAqoSt6a5QNQ8ZpZ4uO8pI0gNs0CpxLOmXrAF bAJGEt/ez2QBsXkF7CR2vVsIZrMIqEg8/7wFrEYUaOa0u2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u997XtwvvqtXamoCV1rcRu/5gXcyWOv+ F+7NS25/yOG0sWefc4gSS3FGoqEWc1FxIgDEyg0y3wEAAA== X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(24454002)(189002)(377454003)(199003)(586003)(2270400002)(65826007)(5660300001)(97736004)(83506001)(568964002)(626004)(5890100001)(8936002)(8676002)(81166006)(81156014)(31696002)(65956001)(65806001)(19580405001)(270700001)(68736007)(31686004)(2950100001)(4326007)(53416004)(77096005)(64126003)(76176999)(54356999)(84326002)(2906002)(4001350100001)(2476003)(50986999)(356003)(33646002)(93886004)(69596002)(36756003)(92566002)(7846002)(305945005)(7696003)(87936001)(512944002)(4610100001)(189998001)(110136002)(86362001)(19580395003)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB407; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD029; 1:VIu6tpJvKODugBDih6Og6ips99Gj2c3b/RxO2rjgCvYcWvdsOYhIxFOnmTB45bXX29GvkWg5KhQW4s26Dx8Pb/Z1hHvjAQIL/ZBeu/sQPcHu9ym0DdRHUWYyD7Fh6BmrhVYdvprOAgIxtV20vFqekxmF5mYY8OeD9qNMKLE4YGxPXghzmGhUy+CT90VVwE+JjBzyN8aq71V56tRG5A8O5gEjv51Kg8Bs3uSiJJ2MVX2DTpbCTBT2flJHsBgPFYqdjRYc3xXiTguGjXwMOt+skf1s/TMkgr33Fq0dJbI9EIiaosg2kMDZxjA00lEm9UNyHLllRfGqOPV0p3OPMphpTaBxvqOU1n3tINwdzWARJhDg4Z/DMB+v8N7q6fmxDB/MO+6eJGG+GRwA/L8/v0sihI9IKOo4VoxRT+zi2eKHjNTmjKrXjocL4P27S7Swns7On5OOwHRZI03EXgJRz4SmMoV98xxngFFFXR8VHB+gKQ0= X-MS-Office365-Filtering-Correlation-Id: 168b8959-19ab-4fda-abe4-08d3d38270f9 X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB407; 2:NG6ejONiDDSjmws6n0lgsbjH4R8X8zfNXEPNPRg/kNcPFNPRF50dpt46vUuPCItbgvKD+/1txWGmW2pRJa1ynUvZuGMvOF5Rf9L2OH9auFASBRksoO4IvIl9ch8yA0nTaiUTjFOtee71Wo6m39HFFdHWGZ3+G8MQAlitWDjy8Q3ZgqQGkoa91N3Ce6XMjX4X; 3:LlqCj3rTk6cEVzgJTFK8+4gIHWLPp2TfErBgbijqnoiOjXvxDDD/L8eNtlz56zCpN5aZDprA6zV1pcMpS+/nj4nIbsumd4jVuQUxvqiLQwY8XPfO9o5Wu1/BmrSLvXYQ6AbqQW7fRpng3Z0B1RTmrjA6UhPAmCDGv+Q3AK2dn8KZJigVMhBIYOVrAl3alJE/O2d/q2THBvS76YapMNUMMlZH94oTvH5ejXiWzNt8dVqY73OwRA2zi3Kb6v9HwOJ/paB75VevgpTUTAwW+mQdKQ== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:BLUPR02MB407; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB407; 25:Q7crXlaWB2Kr4w2I2+EjvyvKuI7+bVuTdOl6KVRrscaBQiUKSB8yOIMVaQTUQXOXIyBh1l4JMd40//R7scYyklmFSu3aHNvwGwpdmxXNzwIWMbG244ixCG2xW1j3RPa3+voX2Zv45HaWuBowGFmL1rzZMfGPc8OpG3DWw5dU53JpdywL7A/wcxdJjaWJFsCEaAOOHTPHsg5Xbx5O1qn0wvLEoHA3Htyk+6EvF34LcLfXWknRM5Zj4Oz7zHMREUSSiOqYNUD8j/ToW7FozraPzLP/fdiL9hsL2eQgfi8JKJeHYVo3ueVPHdd/lEprhcoNsu8XwXIKkad7oTdpabrkmM+1xSXWXMjlQN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HWmmeFc/hzdmQmLTfSi/PquzLX49/tGiRvXYYNtgJumY9z+4R9IMGwXnTN0Te+o0du7pGVNYt2PAsjzebijE7CdHvLcUAgYmqbdW5Ce3pQUtGOs86OEyCBWf8jvZEr8JyL/5qWlFtGnLRdn1aUhiUXLhuhIctZpQZXw66KYQRX/9y5ABvxfnql2TOLPH1vPWKL39JnoqDXJv5JIYukFHIPvSA6mgO9P/Vml3ixfmzaa0Yg9QvUYJcnSeGZ3fl0rusuRDfswVwxOyCQmGbx4lSuxG6vBM8Z6yHrkDVbIudwG+2UJjdD/BC+4zMF/mnv X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415321)(6040176)(601004)(2401047)(13016025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:BLUPR02MB407; BCL:0; PCL:0; RULEID:; SRVR:BLUPR02MB407; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB407; 4:xY9+yffpDSauxu64rjGx1Gm1ZCmVqEcFNiL2kmXw7a1p/+y2ktfEvlHhAi2P/ptiPq6gSUOV/6l2NJwL92krin/97sPxgZxx/8ZRBq58xTG7EhXMpn3TLaH9TppCPOkqGHPrUfkYqDDXZE1LhDPAkEyVpOqL8bhmy1Ca5W16p6MH7CtqhCB2CSJVcMWQk9upoigL03l5Nx5T9NfTaRfnqI6ral2RysYg9nA0cwunqOm/n2QDQjvHHyF9T4ws1PGJXDvn5HV/rKot6zoNBk2HaD0pb88stPAFqSOjgeZORgLEbalLl1cO/Yqew4oDdZxZs/D2v8iaz9lgtZa7iqHD++NYjc64oOjcyZrJZZWgIui39Qa2kcPBHH2I5FQLw1v6rSbODT9UBjoC1ZoCjCVLTv2NqTn5bzpcoj580L8aaUYHjE3GHE9AYPwCwdc42QBhV7DrCk4r3T+aaw0BC2+N9A== X-Forefront-PRVS: 00531FAC2C X-Microsoft-Exchange-Diagnostics: =?us-ascii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4d3fSW2SgBZNLxpFZ/TzRuZbAyMjUJLj8jBWRQj1mNwN4v0ZMIJWZO0olIhJFvfsoraImELwdNsN5z85rTGmDHOZqUjQlJltfJ6nVEb/h8wvJUl7TJjg==; 24:oDyCMlNeFmYE/YfgZTiaW6mZ0R9ic/kRUlJX4XKw59OUr03hZc8GqkTrrMlCdxe3HXi9K5wA6SW3JQHKQcdD2danTQnDdbES0vCykJT5BLg=; 7:OOutj6PoA5YJ9QRrK/8HAIVV+MdkzO91eIwgcoxwVCUZ6AMfqAAj9Tj/9hpiANVlbpk5QdB9OKeiuvDXQG6wa6cGZPF+TQH0qOCBUJNXNJFp2lOxzqOED+CtjEle0sLnuYlVa1UzJdYzPPqNpQVi0HSqWx8C+M6YvKRnKSdAuioHBc95Q0WL191P10QS9FaBeYaRq5V1WzgqkVb/OLKYl3HZEWdezQvkXdpNKtXzDOgm4meljzaB26zT6F8XHI7T SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB407; 20:wYKtariRrF08A5zfu4rSk9wmfM2zKek6WxyU9Unc8qrGtJx/QpbUEBsSB/aEMJmBCIRnfAqRvN/qChframPgA9vCz5LRf23zoVBB8mNMza63CE5Oxnp9sBYaTzGLBK9Az8FWVt6MaZ44k3Wdjyn+O9mRHqDzQaTIXRe+5CFmXeZ6kJa+iFpZbwp3bv0Ori1KLSrr0/bu62WIRAtf9t141WeZqHRuQrWSZIkguH0BYJevbGaK+v8KCAM6vSi1EimM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2016 22:42:37.8843 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB407 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 09/02/2016 09:10 AM, Mike Snitzer wrote: > On Fri, Sep 02 2016 at 11:12am -0400, > Mike Snitzer wrote: > >> So in the case of blk-mq request-based DM: we cannot expect >> blk_mq_freeze_queue(), during suspend, to complete if requests are >> getting requeued to the blk-mq queue via BLK_MQ_RQ_QUEUE_BUSY. > > Looking closer at blk-mq. Currently __blk_mq_run_hw_queue() will move > any requeued requests to the hctx->dispatch list and then performs async > blk_mq_run_hw_queue(). > > To do what you hoped (have blk_mq_freeze_queue() discontinue all use of > blk-mq hw queues during DM suspend) I think we'd need blk-mq to: > 1) avoid processing requeued IO if blk_mq_freeze_queue() was used to > freeze the queue. Meaning it'd have to hold requeued work longer > than it currently does. > 2) Then once blk_mq_unfreeze_queue() is called it'd allow requeues to > proceed. > > This would be catering to a very specific requirement of DM (given it > re-queues IO back to the request_queue during suspend). > > BUT all said, relative to request-based DM multipath, what we have is > perfectly fine on a correctness level: the requests are re-queued > because the blk-mq DM device is suspended. > > Unfortunately on an efficiency level DM suspend creates a lot of busy > looping in blk-mq, with 100% cpu usage in a threads with names > "kworker/3:1H", ideally we'd avoid that! Hello Mike, What blk_mq_freeze_queue() does is to wait until queue_rq() has finished *and* all pending requests have completed. However, I think in dm_stop_queue() all we need is to wait until queue_rq() has finished. How about adding new functions in the block layer core to realize this, e.g. something like in the attached (untested) patch? Busy looping should be avoided - see also the tests of the new "quiescing" flag. Thanks, Bart. From e55a161ee4df7804767ed8faf9ddb698e8852b06 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 2 Sep 2016 09:32:17 -0700 Subject: [PATCH] blk-mq: Introduce blk_mq_quiesce_queue() --- block/blk-mq.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- include/linux/blk-mq.h | 2 ++ include/linux/blkdev.h | 3 +++ 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 123d1ad..0320cd9 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -135,6 +135,46 @@ void blk_mq_unfreeze_queue(struct request_queue *q) } EXPORT_SYMBOL_GPL(blk_mq_unfreeze_queue); +/** + * blk_mq_quiesce_queue - wait until all pending queue_rq calls have finished + * + * Prevent that new I/O requests are queued and wait until all pending + * queue_rq() calls have finished. + */ +void blk_mq_quiesce_queue(struct request_queue *q) +{ + spin_lock_irq(q->queue_lock); + WARN_ON_ONCE(blk_queue_quiescing(q)); + queue_flag_set(QUEUE_FLAG_QUIESCING, q); + spin_unlock_irq(q->queue_lock); + + atomic_inc_return(&q->mq_freeze_depth); + blk_mq_run_hw_queues(q, false); + synchronize_rcu(); + + spin_lock_irq(q->queue_lock); + WARN_ON_ONCE(!blk_queue_quiescing(q)); + queue_flag_clear(QUEUE_FLAG_QUIESCING, q); + spin_unlock_irq(q->queue_lock); +} +EXPORT_SYMBOL_GPL(blk_mq_quiesce_queue); + +/** + * blk_mq_resume_queue - resume request processing + */ +void blk_mq_resume_queue(struct request_queue *q) +{ + int freeze_depth; + + freeze_depth = atomic_dec_return(&q->mq_freeze_depth); + WARN_ON_ONCE(freeze_depth < 0); + if (freeze_depth == 0) + wake_up_all(&q->mq_freeze_wq); + + blk_mq_run_hw_queues(q, false); +} +EXPORT_SYMBOL_GPL(blk_mq_resume_queue); + void blk_mq_wake_waiters(struct request_queue *q) { struct blk_mq_hw_ctx *hctx; @@ -506,6 +546,9 @@ static void blk_mq_requeue_work(struct work_struct *work) struct request *rq, *next; unsigned long flags; + if (blk_queue_quiescing(q)) + return; + spin_lock_irqsave(&q->requeue_lock, flags); list_splice_init(&q->requeue_list, &rq_list); spin_unlock_irqrestore(&q->requeue_lock, flags); @@ -806,6 +849,8 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx) */ flush_busy_ctxs(hctx, &rq_list); + rcu_read_lock(); + /* * If we have previous entries on our dispatch list, grab them * and stuff them at the front for more fair dispatch. @@ -888,8 +933,11 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx) * * blk_mq_run_hw_queue() already checks the STOPPED bit **/ - blk_mq_run_hw_queue(hctx, true); + if (!blk_queue_quiescing(q)) + blk_mq_run_hw_queue(hctx, true); } + + rcu_read_unlock(); } /* diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index bd677bc..8fc07bb 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -248,6 +248,8 @@ void blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset, void blk_mq_freeze_queue(struct request_queue *q); void blk_mq_unfreeze_queue(struct request_queue *q); void blk_mq_freeze_queue_start(struct request_queue *q); +void blk_mq_quiesce_queue(struct request_queue *q); +void blk_mq_resume_queue(struct request_queue *q); int blk_mq_reinit_tagset(struct blk_mq_tag_set *set); void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues); diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index e79055c..9b360fc 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -505,6 +505,7 @@ struct request_queue { #define QUEUE_FLAG_FUA 24 /* device supports FUA writes */ #define QUEUE_FLAG_FLUSH_NQ 25 /* flush not queueuable */ #define QUEUE_FLAG_DAX 26 /* device supports DAX */ +#define QUEUE_FLAG_QUIESCING 27 #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ (1 << QUEUE_FLAG_STACKABLE) | \ @@ -595,6 +596,8 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) #define blk_queue_secure_erase(q) \ (test_bit(QUEUE_FLAG_SECERASE, &(q)->queue_flags)) #define blk_queue_dax(q) test_bit(QUEUE_FLAG_DAX, &(q)->queue_flags) +#define blk_queue_quiescing(q) test_bit(QUEUE_FLAG_QUIESCING, \ + &(q)->queue_flags) #define blk_noretry_request(rq) \ ((rq)->cmd_flags & (REQ_FAILFAST_DEV|REQ_FAILFAST_TRANSPORT| \ -- 2.9.3