From patchwork Thu May 25 18:43:10 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: 9748907 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 F086C60209 for ; Thu, 25 May 2017 18:43:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E63E42679B for ; Thu, 25 May 2017 18:43:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9E542836D; Thu, 25 May 2017 18:43:42 +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 5F06C2679B for ; Thu, 25 May 2017 18:43:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1036486AbdEYSnl (ORCPT ); Thu, 25 May 2017 14:43:41 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:21234 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1036475AbdEYSnh (ORCPT ); Thu, 25 May 2017 14:43:37 -0400 X-IronPort-AV: E=Sophos;i="5.38,393,1491235200"; d="scan'208,223";a="117364857" Received: from mail-bn3nam01lp0176.outbound.protection.outlook.com (HELO NAM01-BN3-obe.outbound.protection.outlook.com) ([216.32.180.176]) by ob1.hgst.iphmx.com with ESMTP; 26 May 2017 02:58:57 +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=SA4maToVtNpH04dwkcd3E2qE6IJKunaXqsdeqqvaliQ=; b=cSdhwnyhS7CPaMoXpeVGlyJyE7anX+QM8w0zLPkOhRsUi6SPNlwpIBrL0+tudLzlqQbAPH2GmbasVWumbWs0bkuJ9dnkkp1zqpnq0n88YIxWZyA5tmy14M5ggL0ahIn7pfohcA4uA8NdmDobmhAzT4nXvrZiXSnH+fDDZI/DP48= Received: from BLUPR0401CA0021.namprd04.prod.outlook.com (10.162.114.159) by SN2PR04MB2319.namprd04.prod.outlook.com (10.166.212.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Thu, 25 May 2017 18:43:31 +0000 Received: from BN3NAM04FT060.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::204) by BLUPR0401CA0021.outlook.office365.com (2a01:111:e400:525a::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; Thu, 25 May 2017 18:43:31 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; fb.com; dkim=none (message not signed) header.d=none;fb.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 BN3NAM04FT060.mail.protection.outlook.com (10.152.93.141) 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; Thu, 25 May 2017 18:43:31 +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 94.BC.45291.1D527295; Thu, 25 May 2017 11:43:30 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Thu, 25 May 2017 11:43:27 -0700 X-AuditID: 0ac94369-166ac9800001b0eb-0f-592725d16fb7 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id B8.E8.11415.FC527295; Thu, 25 May 2017 11:43:27 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Jens Axboe , Omar Sandoval Subject: [PATCH 02/19] block: Introduce queue flag QUEUE_FLAG_SCSI_PDU Date: Thu, 25 May 2017 11:43:10 -0700 Message-ID: <20170525184327.23570-3-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170525184327.23570-1-bart.vanassche@sandisk.com> References: <20170525184327.23570-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsXCddJ5ke4lVfVIg5k7xS3+7znGZrH6bj+b xcrVR5ks9t7Stjh87yqLA6vHxOZ37B6Xz5Z67L7ZwObxeZNcAEsUl01Kak5mWWqRvl0CV8bh v/dZCnoVKxrufWNsYPwi3cXIySEhYCJxbdY95i5GLg4hgaVMEvNXr2ECSQgJbGOU+PvHq4uR A6zo6G9TiJrNjBL/5+9hB6lhEzCS+PZ+JguILSKgINHzeyUbSBGzwDpGifN7T4MNEhZwk7j3 4QQriM0ioCox4fdxVpChvAL2EtfX2EIcIS9xdstOZhCbU8BB4svUi2wgJUJAJSduOIKMlBCY xCqx7MQERpAaXgFBiZMzn4DtZRaQkDj44gUzxM3qEieXzGeawCg0C0nZLCRlCxiZVjGK5Wbm FOempxYYmuoVJ+alZBZn6yXn525ihAR35g7Gu0+8DzEKcDAq8fByPFSLFGJNLCuuzD3EKMHB rCTCq6yoHinEm5JYWZValB9fVJqTWnyIUZqDRUmc95zM1AghgfTEktTs1NSC1CKYLBMHp1QD 46SJqron2iPXuvlrJwTekO7pZ2l5/ICt+ugxAfer0mpZD+LjFgunfl9n/2rBHQOedcet/yg4 rFE133Jz2wrxPd8NvQwM5xed+5Vy3SzCpe1h3IqXN/KPpZ52meur+XjP4pcNZR81p77bzhmR 8nTX74z9zvvDftgvydZJ0DvZO/eEnOzW1RZFzEosxRmJhlrMRcWJAJFKU1xqAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBJMWRmVeSWpSXmKPExsXCtZEjRfe8qnqkwYMZ+hb/9xxjs1h9t5/N 4uDPNkaLlauPMlnsvaVtcfjeVRYHNo+Jze/YPS6fLfXYfbOBzWPamvNMHp83yQWwRnHZpKTm ZJalFunbJXBlHP57n6WgV7Gi4d43xgbGL9JdjBwcEgImEkd/m3YxcnEICWxklPgz5QR7FyMn B5uAkcS39zNZQGwRAQWJnt8r2UCKmAU2MEpsWLqUFSQhLOAmce/DCTCbRUBVYsLv42A2r4C9 xPXfbUwgtoSAvMTZLTuZQWxOAQeJL1MvsoEsFgKqOXHDcQIj9wJGhlWMYrmZOcW56ZkFhoZ6 xYl5KZnF2XrJ+bmbGMFhwRm5g/HpRPNDjEwcnFINjDbHZQxVVz2eNcNl/qMNqdYTeX1155Zu Xzun69X9xUcnFvvsSXo771L9u31vFpiseyt4PfbSk4MeveHnOYvq+d2ure17OVEka09qqt8L nTqdN++znWMPClUUnHdUa/15q8jgcbPwNLnSF5s+Mph/XtWUP3PSrhu3TMqY/i5ue7s/cPr6 /yf72fYrsRRnJBpqMRcVJwIAdyx54LsBAAA= 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)(39410400002)(39860400002)(39400400002)(39450400003)(39850400002)(39840400002)(2980300002)(438002)(199003)(189002)(9170700003)(50226002)(81166006)(8936002)(305945005)(5660300001)(36756003)(356003)(50466002)(478600001)(48376002)(189998001)(50986999)(6916009)(2950100002)(5003940100001)(6666003)(8676002)(72206003)(76176999)(77096006)(33646002)(54906002)(2906002)(1076002)(106466001)(47776003)(53936002)(86362001)(38730400002)(4326008)(110136004); DIR:OUT; SFP:1102; SCL:1; SRVR:SN2PR04MB2319; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT060; 1:uN6Gl+xxC1pS3GOJPvxUGL7Y5No3jrv8CRnfpxgUeiA3Dvns1zky+9jAgWDEGl6EqDnI3K+rZbj/couBr4x5Zu90/NyyihIXFRLjzBQedi0kKMZxy28IYM0EQsgY0+LoORxBxWR8dv05NZCQZm8vYLsCJi4BxyClTAyQu2GhsBnTMNRRnAd9tOfHwIB/47Omm9mQJytXb8Th4+I2y40J6VrhRivRvnTKdvYA4lSw0DjSHBfmvHQeto+yl+qC8tyCGhjKg0slIOph0MUAZe64tyRtpOKCLFZp/T4geumDy12kcwx1vKGcfti7v9TNXkBAJkajdTpqDWC4Qx7vZ1VStVi7WqFPQU+BXQbG8BX5DAemLjnwbAJNqtivbnpxXTyxgky5EYItawMs7WJV6Pcd3WP35knCNFWGmyyWay6JSBvF5+la64n2yM+WQC1fOoZwesZ8L3rODkBz9k5X8Ho2wAELFLomZgoSd31Cg42E/4Xxf1OgFExAAbqhHPDew+hjiP7m7NMoTd/zugI73A1LZU44CW4iGpO7+62PkYLrQiU= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN2PR04MB2319: X-MS-Office365-Filtering-Correlation-Id: 7ef806d6-6b95-48b9-91dd-08d4a39df110 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:SN2PR04MB2319; X-Microsoft-Exchange-Diagnostics: 1; SN2PR04MB2319; 3:h/QSO36ZszAyi/JjPI0itwy50Msken3gUa32LGY+Wzy9yZQ8lpXvtFdO++tZC9e0nf1Fk5Ze6ShEEqzoONEXwbrasy1SkVpXKqjHZj7pKKAVM6Gg9ps5LARLGieIF4+TSRUhc/PQRvmOZKdh1pvsPjb2MEH9Y17QPlwmaZPs8RtBbJDvdrkirJFwKvsAJEgWR4QxVhZ0J5KIBsc4Bd7N4qlK5M6urWEbb+qnOS60Skn+bxd4igT53kPi3rkQRx0ZFHiq7RE+8yL02cTEjpx7aSluS2VKPxd+voyPtqnk4vH1XD9WNzx1ffbyuKNa1qzns5njI2TrazfrX1POLw9wi/8KK4Mdfx+BkioI3WLGtg2bJOI79sPMjOpzU5Da6a/xvoldfyZozo1C3PmQPYG/LZyjo6MYqyxCcxH5DslhlfzRI7NpkQZoH7VF1i+s7HTvCt8z7BElZtGWhmcoL+3F1n1tQi6X14+HgFPZT2IRXzTSpAGyqVe0ScwPjNlISA6M X-Microsoft-Exchange-Diagnostics: 1; SN2PR04MB2319; 25:KDr2obZKs6pTm+Ze9RfMxCe+x36cXX98RInZJp4+UHNTGAzmSfjgdoiNzQDXASi/YHy30ZtmmN8OxKViwRjxBxOSLwP3Ye+bMGpDVBfnAvy6xLqx1jWrEVSeXAGxbH8c3stDH849l7sV9xpBT9Na4bUxeGUXJeITkzCZcwN0WiXBIEJ9cWihxmpoIhEceluqYg69s+3osbSPnCzgypp39nmcCQUhYq1Ovr4fyc+IScWypdtoNUwsCMwMiQXkkloYtsrV4fg6oLTBExPOPFAKt4MfX1wLu/YLQiUejZidsorffUZT+Qihk77FwL996NJBl8wIHAHd0UD0GEBTTtvW+fsQovx6jBxQ5lO2rw0Eulga1kM6rFjWMADqaKFfLhE0W+CPXZtlQvNY7nvz6EWCBFXQpyZAwDimoAWLl0s18bHquh+0dQ3FYDbfTbLKa8FdBzkBkLMj5BOfUK920aGyC6mihnJQyNPP+XaR098rAVU=; 31:MNqDttRgCJyh/u8f1i/MzDcssa0eJkmKuMYJvsCI10LDmQO6vswJoKJ3kSGxqVM7tS0I/GDVWGOawEn//r0MtWCC9UX8hAKk0mykLbxjMXMAnC5gmicRmF5anZhtpj8aJLmTBhRIy6QiFPY+jSPa+hp0tAHx4mM9M1Aptei+2jfZ2FQqBLlciGPxrDEUH2oa6hlNEY35xShSLn+VSTTcKE/uzEQ17I5kuZyAUJnTq2DjxCjx9/wYZl7XSh9tWhiHBi3goqyBdM8JcKVVeBG/Nw== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; SN2PR04MB2319; 20:7h914//LRYW00zsIKFfduUzf+mjGL1JZ0zCjWEp9a7LnymzCq6YSqpdE41AuTwZl5XA9h5lX1FDjiCf0aUJFHSFdWXIGMjTuUIZuhlZbwbhrbu1Xr5iRNClDfRi5zdjxQWMlIOAq0Ep016WOdUdVDjratGbJA6aQ5TlpprCk2ziiKN9T8c8d+hemblRlZqePxozT6v5oum0a7gYTYcj2DHjsjjfSYYolqokQApWOQbMPI3qw/oQzsYh6oA1FLB6TycO78/ktFVAGJdA/aC7j0XHnbcRKVB8etFrn419HCqZowRUwbhKj7Bu+8V01t2TNyowIveBbeh5iUlT7P/O578A3D1F84BcjU+aQDGr14LLl6d1CIW7RtsRKJG1yd4V4YmZqWzWuP609F7YP/y+xXl+D+KoXdkMbDpogOZJsY7SF7BoGy2NlhibQnuQgv7YS7wTxZGcc9yHGabb7L8Vh2D26xtSNkNod6Kuw297tRTZYIDDP92bnWNuFGqgDRrax X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(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)(20161123560025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148); SRVR:SN2PR04MB2319; BCL:0; PCL:0; RULEID:; SRVR:SN2PR04MB2319; X-Microsoft-Exchange-Diagnostics: 1; SN2PR04MB2319; 4:pn2UOuExZUb52oEcgoMx7XlBmwrugxfhNSKffM9yWsSrJbIaalZrzK7SW+QDcxvOUkXM3SojJKOi+jxBK1XxDnVkicOEduVuJOIkcaHF6ZpllYLsKTgweCpigzg+IFQlbI+IwjNFCpwTLxzcHznfsw/bjE2N+oMUmXv4RWryCg18DGusWMHZTO1KjdnD31+9SspkMj+wUEr0QON5fD+e9QlHCjca8NFWenO3GTh2oc1JtSAQFOd6QYoC4SgSWQp4/+Ju8GEe73rmsRoE/CX8pXldtXwym0tbfnFwZ1gItXGaRF7kWYcpZg5+Gx9s/QR/bbIJm+cemxXvkmHOhbwntgtP5OVVrzSmP4R2O0K9QYllaGNSGMhnaz4Ecc43mBxpw89/D9yO7KstLRe/EkejGPpyVwgKtkU5UsX5i3JbkTbDc0vcXT7yP9yrvZSkHKuU9nl/ZXmtnFDMpm7M856KCAA9ldgIDkwSc8aqregLZ+34Mu5/CZfRfgOQR9IF7b1qcf0P6v0ZurUsD1PaO0nrccOOBrsYwsqBPy6ztq0UHTiFgbHsO6oGvQiRJsPsw1KYecetzdYpDwUGhPicpNDGtoxOAPxu/41YdQ9vp7KG57oGcTWZpue5qGbvIfrekcJ0Z/YyCWMzVfg/B0e86I3NczKOtchgKrqN82AMfPpXodfQh4jCtoFF7MRYDyoxZyQsZ5HZW25gVFAadqR61yR2836nuj+o8O8HvIhoBHGHMyXACR74uU2R0SPjmuOEoje+aAU0b6zz20YRgHVPKALSlbHNpGO0KG0CwHW9zu7/bwFn76RRGG4hJrA0tHA82dLW69Wz1je4f5Ywnbu3fRWczd18tUA0kUeHpjPnKT0LIg+Tb5ozS52m/kKmYO5k5Sn4pvYvnG/pnIZw94tDgcvGj6+tm1FJzX14YWSsOpSF+9 E= X-Forefront-PRVS: 0318501FAE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR04MB2319; 23:eiN/9eIIhjCe12Ppxg+xrrjM7kqtFg+g11TtT7xh1?= =?us-ascii?Q?NVn3Itul0LzilYnFn+UFoaiiLgdhpIm64FJJyGV6a9nvjLJAOV79k46A3/2w?= =?us-ascii?Q?vvFjibKx8GtZtorkPhSV2fSaNUfFsUvAwfCK8jCkHjiNsu/NHaqZ0WU4oVTe?= =?us-ascii?Q?ocg2/Te1w+r9MD7XwWYZii565Oo+v9WciPIOQdwPnSPZUBewTY8FiCVBV0da?= =?us-ascii?Q?wjJKsShZ+QUYMsfZGogLIRSPU+jya67nC98lAKQYTu8flgrDiBCBftPQcQi/?= =?us-ascii?Q?C08m1ZCZTwbLvo/38YUNVeyj/Iiznuzqyy6O4yQ0A0YVjkFzmKQvYRItEFJ5?= =?us-ascii?Q?Tm54WzMhIPLZDMnA9SjiG2wdTe9pRyky/KLaVKhURo+qvbWz0q4sNmb2GS/1?= =?us-ascii?Q?InaAuiNOLsejglYOtrOyvnFo7CWFzj688HXQYzHO6tfP1ske8g50wWF+OBRg?= =?us-ascii?Q?dCziJpRsIWgu4I7qpGOe6kHtlMswFbIEkSsSXzyMrye8EthAYHHhPssw5SqG?= =?us-ascii?Q?3eZUUpXh7Exx7GCQlH/GJAzYw7+oD05HpKZ1ohfYnUIOfZYUqldUsiHfVWJ1?= =?us-ascii?Q?icDsb27aH/bQf5JRAGdlo9ykGvqnJ+w48LECkNpp82xGt+wovCZE+Zv4HDfU?= =?us-ascii?Q?/LjN7V88nGYGF/iJlvF8j7hPDtqD073PIMNSa2RMp7D92ei9whpOdYbsDMAf?= =?us-ascii?Q?ZLo8kASnVXvb8GeuwMFmqKU+pmL3cF/emsDzJuqubSFirl0ALHxDdL8Lwh+c?= =?us-ascii?Q?m5BuUjrzz3Yo0+N6OFCDYDnJzvdzwJgXVLzI1WnY7G1xaCgCIVdrox4qKT1S?= =?us-ascii?Q?Fo0RajYDfZqHJaKobD9KwuWmdO1i5aTT75hIGNEBiZOF/rVMPIBya2u6Ww5I?= =?us-ascii?Q?3eTDqbjKoh1FfPVAcqbj3s9WK24OdCRheTSYegdZ4Zc6Bv02tVAePSnEkTl9?= =?us-ascii?Q?2Iv47x3ikdt1ZlWxdb6gHLV/KSB7JBvNwgsK0MHMuNqbA7unUjVUMAaZyMNX?= =?us-ascii?Q?QSboIx8xGILV4faoNSuaHNZPduShscfRenInHO0zA2cMfbCnZLyeDRaBvbx0?= =?us-ascii?Q?HPvKExtawoWNb/blqjLqhF52PCy+1iKT3pZpGV57I3wCZp0AQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR04MB2319; 6:KxGUJirkGqmVNMjXs/8kam+RD2EJYJ5nhIHlOTA6zLNPkdu9dK5xOYuNtNtmE3z0BFzuPKK6qZR76yclAM3b2nzySnXuo2pKo7RhGcEYuFO0PX8iboDiPRFxAlmldYIsiSaKrO5+IaA6JoYZuNL/+BtBExFnq7AxqnJEa/T+hxXExAtVmVPe2f2+nXKE5CWrDxQ+AiA5BPi6qtQKqfJub+AsucF9Vbky/MtTMRgy84ke3V4wTWz5iqCSZneIDsfh/tR0VWQU4x1vWpE64jdaMPTTogBwe3Z0WuXlx7X8caJc2C2YYqb4BaqRUj/rP2CzqaKsjpCV+IcgjDFmSWYnQQCYdgJrout/nOi1MK4Mm2WN22kqirs4CVZXrTUsjIYLVRqQLemZn6SxIerzfMx1EpvZYQV7faSeaAv8+1OWg2wvO460iwW4bKA/wV56fGMHg9+mysWLN85lTAHAxbi+gDwxr2SjqDMMEb005pkoQLQMoHnEoomkur1vcOqr2/Wy2LC8GXFKlyz/rTNrJgnK2K8B/IBaPAd1OmgSaYT6dRw=; 5:D28QGbDF5j/nBOtKnZvPxbfJQ/iWNEYY1nXqXPdQcc/V1mq5nSLyodJvA5CMzNUO4swEt47QjEGbej9d5zorUx6NT1wjwl8teXCir6ASS69losDaXNT5MxYENxR6D/8FueUyw+0plKJtWMQ5Z2+ve7MZja6YlammxEJDZFGQbqs=; 24:8XLmmAmp+Dok9MtVL0W0IClQ1XPAtvNGVdZjyYz+4BR99KakRHFybeCeFRO2aocQPwV8YX63qoGjkOItSUtKOOUjfNEQtShc0rzsaj+l7A8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR04MB2319; 7:EMkxw/CSIU2auWd86nf8CqnPsxU7f360Swt7c7VhSwpJH7lxPwApT28PTfsLw1iLMda40BhL5hInnYS/rc+RDshTIuwDR88DisHnRQJes0MerzaIEfv0dCllgTtvs+dv3iPlfTvSI4jXl4zFsb6nDt2/kIWfdaeK1kFPAt6AzjMQGGo+PFMG3/BKuV7G69bL6nFuNPETdQT2ZgqvCC6WZ4IqjVi6qpt8+SZusHng170+bu4yNTULpYAlgv7Hh93ji5TRoAAbdX+MsJhQbSYk3pp4sBxEWoiQWiEyWnCMw1ZcP1Fxu8Z8/PEu/fTdzGJ3IOe6/J+de5YY9OX2hCwftw==; 20:EBBXZXGDSfL7CRyN3gZfsD827Hgd6cryhFtMwccFdT/FCeKvrSCXUZ69/37DZ1Z2masafnHXVRW2fBF4NPHuPt1AoOKM/NjWdYrED86PfZ/yAvNFXFa/ramIR0hYLnXl75kcQIwDXsot1yS9laCcI/GRgFNGSrnHeCLwNLMvWHg= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2017 18:43:31.0670 (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: SN2PR04MB2319 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_PDU. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Jens Axboe Cc: Christoph Hellwig Cc: Omar Sandoval Reviewed-by: Christoph Hellwig --- 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 | 2 ++ 6 files changed, 8 insertions(+) diff --git a/block/bsg-lib.c b/block/bsg-lib.c index 0a23dbba2d30..298710aa65a3 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_PDU, 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..453d420a96dd 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_PDU, 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..a7cead2fd9ff 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_PDU, 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 814a4bd8405d..48dd47e6bdf4 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2056,6 +2056,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_PDU, 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..f903004f3cad 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_PDU, q); return 0; out_cleanup_queue: diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index b5d1e27631ee..94fd2600584d 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_PDU 30 /* queue supports SCSI commands */ #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ (1 << QUEUE_FLAG_STACKABLE) | \ @@ -708,6 +709,7 @@ 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_pdu(q) test_bit(QUEUE_FLAG_SCSI_PDU, &(q)->queue_flags) #define blk_noretry_request(rq) \ ((rq)->cmd_flags & (REQ_FAILFAST_DEV|REQ_FAILFAST_TRANSPORT| \