From patchwork Wed Apr 19 21:01:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9688943 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 29B4A602DC for ; Wed, 19 Apr 2017 21:01:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A83D28437 for ; Wed, 19 Apr 2017 21:01:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E85728445; Wed, 19 Apr 2017 21:01:44 +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 9D98328437 for ; Wed, 19 Apr 2017 21:01:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965641AbdDSVBm (ORCPT ); Wed, 19 Apr 2017 17:01:42 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:22412 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966133AbdDSVBk (ORCPT ); Wed, 19 Apr 2017 17:01:40 -0400 X-IronPort-AV: E=Sophos;i="5.37,222,1488816000"; d="scan'208";a="12336396" Received: from mail-bn3nam01lp0178.outbound.protection.outlook.com (HELO NAM01-BN3-obe.outbound.protection.outlook.com) ([216.32.180.178]) by ob1.hgst.iphmx.com with ESMTP; 20 Apr 2017 05:01:39 +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=ZErUuicRFXZEydSos5TMHTG6H6hEwwA/kg8XJcUqFRs=; b=eLTx/S8S+Kq/Kb5BfrxaEvBLq8RqxUtNuZAX5UGzVXI79JXYjTInwj4w9lIJBsaC8BwsXhpwksgjuAeyvOfD93kGNkGND7CwONdIkZI8esTDU8klc8aNMz5gGMNpepkNUcIsf9ovuGA5Ajp/ZzzQ81Xh9PMIz6TkJu9GyKAqGSQ= Received: from BN6PR04CA0009.namprd04.prod.outlook.com (10.172.194.19) by BLUPR04MB837.namprd04.prod.outlook.com (10.255.188.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Wed, 19 Apr 2017 21:01:37 +0000 Received: from BN3NAM04FT047.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::203) by BN6PR04CA0009.outlook.office365.com (2603:10b6:404:cb::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13 via Frontend Transport; Wed, 19 Apr 2017 21:01:37 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; bjorling.me; dkim=none (message not signed) header.d=none;bjorling.me; 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 BN3NAM04FT047.mail.protection.outlook.com (10.152.92.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1019.14 via Frontend Transport; Wed, 19 Apr 2017 21:01:36 +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 A4.CC.19026.F20D7F85; Wed, 19 Apr 2017 14:01:35 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Wed, 19 Apr 2017 14:01:31 -0700 X-AuditID: 0ac94371-41ba798000004a52-31-58f7d02f0a76 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id FE.3F.11415.B20D7F85; Wed, 19 Apr 2017 14:01:31 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Bart Van Assche , =?UTF-8?q?Matias=20Bj=C3=B8rling?= , Adam Manzanares Subject: [PATCH v2 2/5] null_blk: Use blk_init_request_from_bio() instead of open-coding it Date: Wed, 19 Apr 2017 14:01:25 -0700 Message-ID: <20170419210128.28374-3-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170419210128.28374-1-bart.vanassche@sandisk.com> References: <20170419210128.28374-1-bart.vanassche@sandisk.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsXCddJ5ka7+he8RBlufiVisvtvPZrH3lrbF 898xDsweHce6GT0uny31+LxJLoA5issmJTUnsyy1SN8ugSvj/MZdzAVvOCsebOlgbGCcydHF yMkhIWAiceRoP1sXIxeHkMBSJonXc2+wQzjbGCVOTX7NDlP18+JzVojEZkaJx592sYEk2ASM JL69n8kCYosIKEj0/F4JNopZYBOjxPIvDxlBEsIC0RJPPnxlArFZBFQlPt/9zApi8wrYS5x+ 8IwFYoO8xNktO5lBbE4BB4mPN2+C2UJANf1zJjFB1AtKnJz5BKyeWUBTonX7b3YIW16ieets ZpDFEgLbWCW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S-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39850400002)(39840400002)(39400400002)(39860400002)(39450400003)(39410400002)(2980300002)(438002)(199003)(189002)(9170700003)(76176999)(5820100001)(1076002)(106466001)(356003)(4326008)(189998001)(8676002)(86362001)(50226002)(81166006)(5660300001)(50466002)(8936002)(23676002)(38730400002)(50986999)(110136004)(6666003)(2870700001)(2906002)(2950100002)(6916009)(305945005)(36756003)(33646002)(54906002)(53936002)(47776003)(77096006); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR04MB837; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT047; 1:K0ywaeVWMVkSnlqbDDKgprhZMCp5jtalm0pg+Dtc4+Pn6SR8DVC/W0DCAdYQZBztANAUZJl95yGzXm/WExSgIUt4J5ZEOBdQvyI7OW0elj2PfcKIpi1lE7q5EPjUg9YQsvJghLcJJCr5tiAS/LO6WcoehnrLUBckZ5AVc9zZPQvW89UCOtW+gFXksCkRo/ib36LKmADIWyGvqj9O7NVVie+VyO1HQlxwofiRpfp+2LB9qoYnUa3BBqpaUL69H24A1LhcYtCwmvR0s3wNvkXr+Sq+C87obQ3yzfffhSY5fdPKRYUyIuGq3BygJVdTUYPs0z60caUjMrwbdxFLuuIxIA0KrUx3jXQS/24Z5Jf0qL5QmWzzWLmv7s9vwwFa8Qt1zwpk9V+W8vHXI23X8/mGU5YmhlMS5XHc23mhhA2V+axe97ALtVWZRSHx/irrRuW7/p1UBzhKjjqY947Cj2Xup+swjccc2TGZcqPVV3HCCAMCEtfk4Vk5VEmHr1SIf8+LBznh+Q0P/RBIPxahBJNelJqxfImMvrBUtda+O1lTgdw= X-MS-Office365-Filtering-Correlation-Id: 7f1e4ffa-4272-41a3-fde1-08d4876744ab X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BLUPR04MB837; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB837; 3:LtQ7pzLaGlFCCt1+IHQ5dxy5weXy7hjjq/cC04+A7HxTgfvze8XWB/bSU8gXUq1MG7EfgML7fiuOtpsmGxpQGlGq6WDRuqHE673pg5XXugjEs6cqPTb3lnPzXaGVYJzw2ta4H8ke/2+mr6YPbzS3p6HPvnC2euVz4AqPldLVD1ChsXWMEZS7jnuqRtMCkh1bUsL80ZM5XOallYPJByIwSJM/Ay3PfR0R5bEsfLyTn4SHbtgq5dlaX3zD4pJmpZFTYz985pxdo2u81vX2VkJzkfq/tL90bd8RFP64ZD0/3ZTmXbxbi1uJe6hhoAZh9xdDhO5UCUN/9+g44P8CIN6gpSkD4NdWs7qrdK/b48wjLcXMlkGsDNuFGEj0uwCoVQ+eU+MvE7s3A6nCN4rEb3yDgUQ79PRkJd89Fy7cuvT4h2OQiai6uBUw8cEwr7CqheQu6EHbXzuTNobxqBVJkEMBLqWx9O7JMdIybxOFr8iCx3u9JjY+FxM1w5cHQF8ljkAs X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB837; 25:SNgWGbmA+2uYl7hWnDN2BCcEha1hVteBvzlHsJw7tgTeIsly2ECMoBj0RKxj9O44JnrsyRuRWWQLNqwWsRe8HNi1maQY6QzzFzRxhjGsG/2X0bGHN4z9U1pbWs8izBtYSMXkB1y8E58e8tqoW9dU9NmmbkiOV9/B+4n75mtjCnNT/4+9VS2n5Jv9NWoYKPBra96AhQ8V5IhDjqIR27TOZX/Zw0dMPELddAswsFS2e6ccbW2dtobYr/IcPNcqY5neNzkpjv91sLeAk3f8XgAWcnJXLsbXmmTpqXA/lk/0p8KD886NYYir/cbnGUGjSqrWDpV3W11uqG8Er1a8IEbUEPXHrRFP2BFh/9ggfB7x4nxIkSoM27qtqu+pnQiHCSW6kefu3t/bx8iUUyshdAJXKPUzUWJcaQuV7PZT6VsOUdXMUis2T2gIc+W4F2qPn3qg6NxNcrD3Z16CZ+do6vCRIw==; 31:lR12EV373FBWoPqNm370SXvY1oXsSydi/pyeOUmbHLruMzG+6T+z+UA6inq5yUjynbLwga/yRyIF9CTHcUnxbqXcIfqSpyFaLROnaKTf/MklpLzBey0+basGipjZurrMjx/rAVnMzBvZEgC+xey6HfQ5vIZdZ/ZZNz2Ise3g+tVjblFSTcvfPBFjNQEDICmjoj9cDCMN827QPdKxDjimzUM2w9DnylIFtC182yQ1I9L4OQ0FdFUxJrk2MKpJsV8LW7LWUw3xEvMcZHY/BLVqhVHuYNuxwRak8+83X2ulc8s= WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB837; 20:lNY4iZkA1x8ZXKaLG+pnmZ7myToBeZtod/Eh6C34W1fruWXaHnTsEKaqEKBpQbbmV6sZvswAtfsd1eVnXELoAvLIW6jSGPUULzLsNghyf5Tl4X2hq7HVvucSXVboa8GR7hnHeGrF98p/FjhZWNvUk3rJVtXYaacDnDMYwF8tizC5azo45zFwI4aoYiz84ASbMICZl+WjyGQfNl1KlCb2aVAMTz4AvZMpDxMkW7/6ZybO/SQJpEVYE1T/SX5NxEvWx/pvafDkXnFhRqzIwC+NrvfgGJWwnDOWN7X2S+zaU9GUIgxehg83IfAyVMnoJuZ98Wk9FLsDZlunNdDSik72Ib2nAiOTqCyk6gnq6BmUastyFnVuS0a8WdVJGHRkdDH/2xa+Z41cIfx2eMPnqDzzaIt7N+aiNmEKX9QgXvJVnyvZkHxeDD8KDAEMdipRJqnQBMV7QSQuxUEyS3PyHN74+3GWjC/Jj5TszktOXbsUyLBLdNDWX7qxQS5R9TVHWyeS X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13016025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93004095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148); SRVR:BLUPR04MB837; BCL:0; PCL:0; RULEID:; SRVR:BLUPR04MB837; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB837; 4:HEXWcWjKKYmlV9ZTrj/Am9yjnDyiOkEg2blomoa+d8QXxBKOsuhUkiUWfbbR6EWMpuR4fIDY6690GCsLNjcDMk74YlbfBNseECsm5lqFyea6op1Hvlu6VbSzLg8NakVWn6GU6cbyysFYueR/oPnXKe5EeIXhPOK+riUgCDRaOihi7pteEmoW1lDlnRV40g510yb8oJaB3hJ7UJ0AQJumsb9J7BLs27mVOlaa106GBMeLHpQ8oQa8DoPTSn0W0YjTdx48A3twb6Pej/4X+29yIZh34L147U9QJetqihoft9atuSVZLpabyoKqjap6jqe2NlrXVkDpe+DQpl8MeqcYaVYpuholEMru8WWegU4yfojxtZEAWO1CUNuU1eQQqY8IBk5JIvumlKq6Cfn/gre2O9KooaN7xWfQcFD6B4JXo66KZv5EyrowaSZHhXj65hR3wO/m5OI1nLdKKWbn0xSGp7XMUrTUzhfPk/AOZZ4sXxYU+gIwyaQDiMCDzIVj2y/b7WMgPYfOOcJKxgPE3K5s4yQDAbMAbCu4HPiAR8wkuqci5EjjW7ccOTBmD0zNBDcXy87jJLouQTaxXQ96QdtHzPCNj7YXnMQn0Ej83KjQ64AEJp/DeWAhE8vMZKcFRdfFw1UJvYFkYBqS4A3X8TS0BYmSooHKUkY1cM2UGKJ1t7N5MbqwqdkN5zoV5z8LrvtEsWVANA46bS9m01rQkJ0or9hmZBFtCkTpUb4SEkcBEmeOyCvPtEov7NReI7zwNAQLh1QlfToJ60vLYtcN2FNwXd2LNhTV9R5S5jTtL4Ql/a/jsvA0Z+Mt3gcipZrfhWes X-Forefront-PRVS: 028256169F X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTFVQUjA0TUI4Mzc7MjM6d1h2ZTVNOU1WV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IcgVhIzHFijJyCAt2AJ44QArRQEKsW1okZGr7djBLKGQEKiiHIpJqiAyk8OKfDhkor9myfZXecFwjWi3TCPq73KUx7/XALRRnoZmLoqxLlb0DI0QN8=; 5:Sb+vDF/LILqMThA5JrjyPqKtPpfMJLFyKs8v5NpfGrMo/wTmaLja4cHzc/t/ujH7oO9vYxb+1lwxd1tgdvtnrzxgb69j3hosqOqQ3sVyemqnrfXcldEhtx5fK0fIf4ZR1VLVETTAQXnyxPS56r45DA==; 24:1tblOJDzLy28I2Gpl1nxbfjQKRmnNYMwOPNHOCXwQhbZNCp/yLJUIDxtVlvgtIgWfEh9T0/TQUxQyt/i4RBaup7aIR65BkoQW/Ot93rz1mw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB837; 7:8DhkvgG5/x5CJaPiNQA4RWlak47f1M1C7Rdv3MqhEdgu3d+dBKiuqCSkEEGCR/IlrQbT6wRrw7zisxdPnRu0u54QwKHXEyz9Djq6+ydHuYexwQrMBkVS6tuJ2ozdkFrHyg80LfKN0vXa0LsS6flyN5m5hhKRrUATiJUJY85wMVUv6DEigfoILZqTeudAo/C0lHVezuEC5turjKaGxpLibvSjLJht81JVjW5fhZMT3LbDiERW7DRenO4ZThnrZUTEBmcQUij9F1+F/1Co/MrjSurzkdbAXjQsCzZfV48YiFgG0ESK9cIX2dZtnfRM3G2a01ATo/xEu1vzTl2X/hjjjQ==; 20:W23TaJRpvJ6uaeztrYeTn02bJU+O7tCc9Cffd2WrfCwOMwCqBTLJA15ZZ7L75bQuGF+u6erNLhc99KylUlYm50irW6EeXUsMszHSHaJGnw9QFnH3Jc2aOmd81o4LKE8nGncvd7ucAQmBczBNmMsBpEffoVoU6aZ7KrDaij5gzQU= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2017 21:01:36.5992 (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.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR04MB837 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 This patch changes the behavior of the null_blk driver for the LightNVM mode as follows: * REQ_FAILFAST_MASK is set for read-ahead requests. * If no I/O priority has been set in the bio, the I/O priority is copied from the I/O context. * The rq_disk member is initialized if bio->bi_bdev != NULL. * req->errors is initialized to zero. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Matias Bjørling Cc: Adam Manzanares Reviewed-by: Johannes Thumshirn --- drivers/block/null_blk.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index f93906ff31e8..e79e3d24e229 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -443,14 +443,7 @@ static int null_lnvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd) if (IS_ERR(rq)) return -ENOMEM; - rq->__sector = bio->bi_iter.bi_sector; - rq->ioprio = bio_prio(bio); - - if (bio_has_data(bio)) - rq->nr_phys_segments = bio_phys_segments(q, bio); - - rq->__data_len = bio->bi_iter.bi_size; - rq->bio = rq->biotail = bio; + blk_init_request_from_bio(rq, bio); rq->end_io_data = rqd;