From patchwork Wed May 31 21:43:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9758213 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 D548160390 for ; Wed, 31 May 2017 21:46:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6079284C4 for ; Wed, 31 May 2017 21:46:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B96A328451; Wed, 31 May 2017 21:46:09 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI 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 5980D28451 for ; Wed, 31 May 2017 21:46:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751004AbdEaVpD (ORCPT ); Wed, 31 May 2017 17:45:03 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:50446 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751083AbdEaVo7 (ORCPT ); Wed, 31 May 2017 17:44:59 -0400 X-IronPort-AV: E=Sophos;i="5.39,276,1493654400"; d="scan'208,223";a="23036773" Received: from mail-co1nam03lp0015.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) ([216.32.181.15]) by ob1.hgst.iphmx.com with ESMTP; 01 Jun 2017 05:44:10 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=l/Y/7kiULw4BZ/EgG635MP+GOPdLpycdKG7mIrustvQ=; b=bC1VH460ktxnF7ZooB74EXYFHBhLF5PubTX44x2cqLcyaeC5SXzHx3hUk6EPelAq6g7lkXptIb0fecDXjkFe3HGHmjSguLAyreiCEGGw5JlAiBM/Su8csHnF62qcEurmlG2w2H+zxjhE3tXR7YwNS5FSnxOSyfotPtbMu1wTEDk= Received: from DM5PR04CA0045.namprd04.prod.outlook.com (10.171.152.159) by MWHPR04MB0399.namprd04.prod.outlook.com (10.173.48.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Wed, 31 May 2017 21:43:58 +0000 Received: from CO1NAM04FT009.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::208) by DM5PR04CA0045.outlook.office365.com (2603:10b6:3:12b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Wed, 31 May 2017 21:43:58 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; microsemi.com; dkim=none (message not signed) header.d=none;microsemi.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by CO1NAM04FT009.mail.protection.outlook.com (10.152.90.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1101.12 via Frontend Transport; Wed, 31 May 2017 21:43:58 +0000 Received: from MILHUBIP04.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 E4.22.51736.A193F295; Wed, 31 May 2017 14:43:57 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Wed, 31 May 2017 14:43:54 -0700 X-AuditID: 0ac94369-357ff7000000ca18-b8-592f391ac1bd Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id B9.DD.18148.9193F295; Wed, 31 May 2017 14:43:54 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Omar Sandoval , "Don Brace" Subject: [PATCH v2 2/6] block: Introduce queue flag QUEUE_FLAG_SCSI_PASSTHROUGH Date: Wed, 31 May 2017 14:43:46 -0700 Message-ID: <20170531214350.31157-3-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170531214350.31157-1-bart.vanassche@sandisk.com> References: <20170531214350.31157-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRmVeSWpSXmKPExsXCddJ5ka6spX6kwbI3Ihar7/azWZz7089u sXL1USaLvbe0LQ7fu8riwOoxsfkdu8fls6Ueu282sHnMWfuQzePzJrkA1igum5TUnMyy1CJ9 uwSujAPztzEXrFSqOHZdr4GxS7aLkZNDQsBEYmf/I/YuRi4OIYGlTBKTug4wQzg7GCWau+ez w1St3DKZBSKxmVHiz461jCAJNgEjiW/vZ7KA2CICChI9v1eygRQxg3RfXfOKFSQhLOAvsfL7 GrAiFgFViZMXuplBbF4Be4lPZ96zQmyQlzi7ZSdYnFPAQWJKxzOwzUJANe/vd4BtlhCYxCpx 6cFHVohmQYmTM5+ADWUWkJA4+OIFM0SDusTJJfOZJjAKzUJSNgtJ2QJGplWMYrmZOcW56akF hqZ6xYl5KZnF2XrJ+bmbGCHBnrmD8e4T70OMAhyMSjy8Ahf1IoVYE8uKK3MPMUpwMCuJ8Pqq 6UcK8aYkVlalFuXHF5XmpBYfYpTmYFES5z0nMzVCSCA9sSQ1OzW1ILUIJsvEwSnVwLhLcP3C +v+zj2X21W5/wcuZ8Ks9rrSu//+pPV3r7vY+tzeaefff/nVaqV2qt71mmm106vlgPvfsHAX3 02KXP5i0tW049iUw7cfm1GSJuoNXz6dweSdkq0j2fOA7tN6h9+qXd49YHj2cyGnkbzBj5qap 89fyKq0yYpphJm5/7e6E5ZdTDGyvPxRWYinOSDTUYi4qTgQA/DyLmHICAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHJMWRmVeSWpSXmKPExsXCtZEjRVfKUj/SoPMmk8Xqu/1sFgd/tjFa nPvTz26xcvVRJou9t7QtDt+7yuLA5jGx+R27x+WzpR67bzawecxZ+5DNY9qa80wenzfJBbBF cdmkpOZklqUW6dslcGUcmL+NuWClUsWx63oNjF2yXYycHBICJhIrt0xm6WLk4hAS2Mgo0bv/ BxtIgk3ASOLb+5ksILaIgIJEz++VbCBFzAK7GCUWHPjABJIQFvCXWPl9DVgRi4CqxMkL3cwg Nq+AvcTUq+/YITbIS5zdshMszingIDGl4xlYXAio5v39DpYJjNwLGBlWMYrlZuYU56ZnFhga 6RUn5qVkFmfrJefnbmIEhwhn1A7G6xPNDzEycXBKNTAG3F+9/1HtTMttaRv7r2VKG0se2Z2p U3LjnKDR7oMF2StfVb2T2bc13E9zccyM2z6ZDn1l89Z3qpnM7yqW01TqktROuVfbU2Crrtkm PnXTFv0iK7127qA1FlFvrS4dmnai+V1ezCH2jXIn1R65bJM9dOY5086Fx9o2X5z67FvNPf+u GLapM38rsRRnJBpqMRcVJwIAxHnzesEBAAA= MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(39840400002)(39850400002)(39410400002)(39450400003)(39400400002)(2980300002)(438002)(51234002)(9170700003)(5660300001)(305945005)(4326008)(77096006)(6666003)(2950100002)(6916009)(8656002)(110136004)(38730400002)(356003)(189998001)(2906002)(72206003)(478600001)(48376002)(5003940100001)(50466002)(8936002)(47776003)(36756003)(50226002)(50986999)(1076002)(86362001)(76176999)(54906002)(53936002)(106466001)(8676002)(33646002)(81166006); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR04MB0399; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT009; 1:U07f8Nb7tclgoa/Pca2Rfk8qEzzyWM/HdukjEDCaMAH8bVbo6rYSCb6oYhLJFY26LWERxyh7A1KyARhLe7V6cYBtTH+yHlZPoVrX0TApIWlfSWJI/Fv2mL9SRxno1U+4ie76OPfDxN0NSH6GvvyxS2Bvlm+MWtGvwkR8uAInftRlZnmvHq0/dMW3Z1B6dt64R3mh9SKaT3ULskP8WL1YWUzfSfIeITczwO5LjUUy3+YDGXZnN2E1iu/YyhWqfy8e0h/96obabXmSwC8C0XLZvz8VFUdG+D4pqTR3S5V4DffodnkUlFAfq4r06+POKYV9JxfG7bQfhLHOLfTcO29X5hwimrgb5ovastGXOgYqLcdZ+JcVnTm8RPt8nhnvbOZbPXlrjJ5UuHJwzAR1Mf8b4A102gDZZiJ4OJ+jgKxKLWcZPPuXnmTMJWW3sPsjssC4TC7p+rgmEziW20QAlGF7l/2aZTekTHARpyLB2MihZTAWaUFwOPnJGCV6fh0pMTm4ZlAqr705bU5DGcyKrjwOVbTsIqM5siPRoXuAyQ5V1+yIGd96Sm+Eoh7rjJDEzDdL X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR04MB0399: X-MS-Office365-Filtering-Correlation-Id: b385cde5-8d18-4b36-5e8e-08d4a86e24ce X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:MWHPR04MB0399; X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0399; 3:OeKdNvCbkN54BgHn8FD7SjeIKZfTGHMP7sVwMU2RrdkgpkGyZ0y2k3JeRVFbNAVwuL0k6UXu6ejnx56g28VzchWX+M6El6O5tvdQwCVr7j1qrvHTaEkYhM4ly5hV5T+OINJih31Toy/8WuYBpmw91D/I6fLMvK1Pb1U7R9kW4HCYprnj5wwbIxhiT/Jwstn2jQAXUTH3Ew9c7JYplOBTCviyPA8zGbysA3OqXWjILjxZu4zP5uojW5TLZ9cuq2y91YyZFqQn/dXbISUosHgCjTe8K8EQxNkXw1nYEsU5RAjLVR/ccduZiiA+3g3zkxo9YeVzVtxiYs8RCrwT+h0FztJwRWZ3IHUFJ05IhypdNZkQoG2Ui7qpZeTfc+DgSSslPSvG3dc8kuHUQEvnZpihthA4OAq8lwoSc9IHQNfhhxcPfImWddBG7SKsNd+sWqOYUA6h0bYa6+tb7XFDh5lONGFMwSV+d9QvisuglGgxDSnXg3ZDUbXwLrqa2D3O4i/z X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0399; 25:nsGZ2GxhENs11NT0kdhhI2TvNFJyax60niOzaSZFe4GoIL7IRiZW8Sy0Mvr5lnUoig1pCuofh7HluZ4fV9sTAKwjJQyuVVm2QIOuTFz3cH8biOB1fNXFCtIqVnQWJsO5FUAwLKb612sbYc3Ar4s6mjcw90N6qzsQ1HkCxNL0xntybdVnYFRc0dzRakBsMSsDS8RKWl5tsKkOvmHTiQj1jyHLOcsuFKDUvsFAm5L/xrUcFSnnFCY9GAmZJcougipkevbP22DTKXs2pagmN7w1qyOVydfqKs5ouYmbmC14WQ/IFRudQO/wIDT5+OAMa9uALdeXpDn+ObA2YRQYz84xAkUSBWkI1i9neIua2MRNE0QFXVivmFKyXmN/MGMJsnn//LyZBI6zMnUeXStib64JxdaVimgwB6Sxy7/WlwBz88jAD8LOZjBRLT1Ah/xNyhyTF+tnLxzFH1ExCRLGCrZy4n0EKBeCrmkdp+dViSBanFM=; 31:kXxzAweB4cLy5JtxwN3bu4NR/bRZQm6TztBp9O8ivgAg27+GDqa2PcwcOUzd9ZgvPB9n+C8JkjzQ+DdRXDlZYG18LdAXEwGbNF6Bp2xbs7YQDmbKuFByW52j6vQkzGYG+3HGKg8wo5i8DzJsCrPY5QbQ2WZgff+lwE2d5tsaHfbCNWCQ09mM+oSeCC7U2+5Q0SWKP5HZVHe0YreHiquLKOQo8YRi93D/pGd4CeUT9QGh5vRDV+vH1E8oHpcJGP8b WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0399; 20:wJQHd/qbQqb7FIJOd3VUCS/EvCOHc9VP1755oRKMIt26ng0Hij5HIBRVdgotLPvUAq7PZ4+/MVsbckz+UIjekwC+yvugzh1iBf8BAsYAtXC4+R4u19SpP3UecQEZBLzkzXxQFZbDy7SnuGvLRaeKFe5sLuq63XluVIs4bBAfao8BKgxvcrxvfO8eCmDGSR73hKxftVOKhEHeiunYQ4IyGLDSsABS7d9BnvbffTtMulGUsFEN8yEkOlh7ZRzziooKOW/pYYV1OH94NIN3i+gberUNocGSMU6MrfB+oCUTYUM4JtPv3lmXRlfFY4xynG5zpBKVh6snyKrCHabui5jEu3qk6LA7Vnltp3J18cIbik3aTg/h85q4QCROs4LAp9m4+6y+8dHAAyNPACyeTyKjuYhKSrM4S5Y3AYgXytTZTWj/OzOMwK9NX25MaC35R0CsfFUDJkfYucYMBBe3cfEDgDe9Xdfi5va6Cj/49dDTxCvRLvVLBdSY7gYtApJQWEGa X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(72170198267865)(146099531331640)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(6072148); SRVR:MWHPR04MB0399; BCL:0; PCL:0; RULEID:; SRVR:MWHPR04MB0399; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR04MB0399; 4:qOlakZ2JI+UPaQhCL6Rfgdlr4sAv9ZVnz6V+VLf8P5?= =?us-ascii?Q?h6L3EG1poUa1qTMnkTaSdzw6NYOf0QNI/2Bm/Z2GZKhMUy4PLMcWckpvKGeu?= =?us-ascii?Q?bq8nPgLRbk9aN3bSGQVO4MAwjSxlfkfGokv0xWG40GzLO68pRMUTRB10E8Zj?= =?us-ascii?Q?adLnXT/eLqHaszW8fRlO1AwRe1TsV3XdepjQTXgC9UMvCBdAWg1vIY8u7XMM?= =?us-ascii?Q?0zf++SXVymwKCvtK1e0FlkIKBg6Ly1KiBQhapNy3i1zo464wtPph2kXyVNSN?= =?us-ascii?Q?nTJKVdVrBuG+VVvXPUg66HDNyfkMSU0uMy4KEVXjYVqqZ1DqCtf8YHHhGyYH?= =?us-ascii?Q?vcovQmtYknUqkXaSQXl4kClAUH9whcPl7hybEl5oFyPzNsux9JoTpxj/C/xa?= =?us-ascii?Q?hTpUR4ypXYXztE8eJd7of33kKghvBmOE/X1CNSSV5pLeYJVArBeWFU/SWKli?= =?us-ascii?Q?x/ZvHMURkegZoUXsXECMAeA4s7EC3Q5uY+7OCPvo28WSGh2R7Fr6tihbPNff?= =?us-ascii?Q?JBjV80AuEXFy6K97vPN6cM0L/rQLUvDth4YyrGKef0kDMBsTQgC2SPzxDTn5?= =?us-ascii?Q?UdDm1oLAnvzV7lI6wyuS+V9YfnG76dpgMst0Nxw7sOxmYNr5Jq8p8zEZP/nX?= =?us-ascii?Q?1yrLeMBJlKtqEMiT7Pe7qbygi4ZSiCszzztTXX3e8lUklr+p/4Jl23vPpgt+?= =?us-ascii?Q?G9l6A5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mwR0D/FMAfoEesTov6WdCvYc1JFCHa6w71SzEVzQfS4JA= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2017 21:43:58.0174 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR04MB0399 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 From the context where a SCSI command is submitted it is not always possible to figure out whether or not the queue the command is submitted to has struct scsi_request as the first member of its private data. Hence introduce the flag QUEUE_FLAG_SCSI_PASSTHROUGH. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Cc: Omar Sandoval Cc: Don Brace --- block/bsg-lib.c | 1 + drivers/block/cciss.c | 1 + drivers/ide/ide-probe.c | 1 + drivers/scsi/scsi_lib.c | 2 ++ drivers/scsi/scsi_transport_sas.c | 1 + include/linux/blkdev.h | 3 +++ 6 files changed, 9 insertions(+) diff --git a/block/bsg-lib.c b/block/bsg-lib.c index 0a23dbba2d30..9b91daefcd9b 100644 --- a/block/bsg-lib.c +++ b/block/bsg-lib.c @@ -246,6 +246,7 @@ struct request_queue *bsg_setup_queue(struct device *dev, char *name, q->bsg_job_size = dd_job_size; q->bsg_job_fn = job_fn; queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q); + queue_flag_set_unlocked(QUEUE_FLAG_SCSI_PASSTHROUGH, q); blk_queue_softirq_done(q, bsg_softirq_done); blk_queue_rq_timeout(q, BLK_DEFAULT_SG_TIMEOUT); diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index cd375503f7b0..3761066fe89d 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1956,6 +1956,7 @@ static int cciss_add_disk(ctlr_info_t *h, struct gendisk *disk, disk->queue->cmd_size = sizeof(struct scsi_request); disk->queue->request_fn = do_cciss_request; disk->queue->queue_lock = &h->lock; + queue_flag_set_unlocked(QUEUE_FLAG_SCSI_PASSTHROUGH, disk->queue); if (blk_init_allocated_queue(disk->queue) < 0) goto cleanup_queue; diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 023562565d11..b3f85250dea9 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -773,6 +773,7 @@ static int ide_init_queue(ide_drive_t *drive) q->request_fn = do_ide_request; q->init_rq_fn = ide_init_rq; q->cmd_size = sizeof(struct ide_request); + queue_flag_set_unlocked(QUEUE_FLAG_SCSI_PASSTHROUGH, q); if (blk_init_allocated_queue(q) < 0) { blk_cleanup_queue(q); return 1; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 99e16ac479e3..884aaa84c2dd 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2057,6 +2057,8 @@ void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q) { struct device *dev = shost->dma_dev; + queue_flag_set_unlocked(QUEUE_FLAG_SCSI_PASSTHROUGH, q); + /* * this limit is imposed by hardware restrictions */ diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 0ebe2f1bb908..d16414bfe2ef 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -264,6 +264,7 @@ static int sas_bsg_initialize(struct Scsi_Host *shost, struct sas_rphy *rphy) q->queuedata = shost; queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q); + queue_flag_set_unlocked(QUEUE_FLAG_SCSI_PASSTHROUGH, q); return 0; out_cleanup_queue: diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ab92c4ea138b..019f18c65098 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -618,6 +618,7 @@ struct request_queue { #define QUEUE_FLAG_STATS 27 /* track rq completion times */ #define QUEUE_FLAG_POLL_STATS 28 /* collecting stats for hybrid polling */ #define QUEUE_FLAG_REGISTERED 29 /* queue has been registered to a disk */ +#define QUEUE_FLAG_SCSI_PASSTHROUGH 30 /* queue supports SCSI commands */ #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ (1 << QUEUE_FLAG_STACKABLE) | \ @@ -708,6 +709,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_scsi_passthrough(q) \ + test_bit(QUEUE_FLAG_SCSI_PASSTHROUGH, &(q)->queue_flags) #define blk_noretry_request(rq) \ ((rq)->cmd_flags & (REQ_FAILFAST_DEV|REQ_FAILFAST_TRANSPORT| \