From patchwork Wed Apr 19 21:01:26 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: 9688949 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 E086960383 for ; Wed, 19 Apr 2017 21:01:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1A9128437 for ; Wed, 19 Apr 2017 21:01:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C657D28445; Wed, 19 Apr 2017 21:01:48 +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 4D1A12843B for ; Wed, 19 Apr 2017 21:01:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966136AbdDSVBr (ORCPT ); Wed, 19 Apr 2017 17:01:47 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:19978 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966133AbdDSVBn (ORCPT ); Wed, 19 Apr 2017 17:01:43 -0400 X-IronPort-AV: E=Sophos;i="5.37,222,1488816000"; d="scan'208";a="11685500" Received: from mail-bl2nam02lp0079.outbound.protection.outlook.com (HELO NAM02-BL2-obe.outbound.protection.outlook.com) ([207.46.163.79]) by ob1.hgst.iphmx.com with ESMTP; 20 Apr 2017 05:01:40 +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=dUFSrfGhGwqgd/VJYko0rRIbChen3idmvZE9LjyUORY=; b=mJVeO3RwX89LBSlHMnuA42lDH8PMyTXeU6nkkgYx3uUVy0rF/RRNo6W0SFn9lhE0yxHSSV7nLAak9n55mUEqPs1r2Wsn/V3QKgfYU/ZzU5KLN9TghRSktI3OqkU7tZGUakjrjNqo5Rngr311PnSmMgYQYTZBgJ3qz6LGiX2vVVU= Received: from DM2PR04CA041.namprd04.prod.outlook.com (10.141.154.159) by CY1PR04MB2234.namprd04.prod.outlook.com (10.167.8.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Wed, 19 Apr 2017 21:01:37 +0000 Received: from CO1NAM04FT008.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::204) by DM2PR04CA041.outlook.office365.com (2a01:111:e400:243c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10 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 CO1NAM04FT008.mail.protection.outlook.com (10.152.90.91) 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:37 +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 05.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-33-58f7d02f621f Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id BF.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 3/5] lightnvm: Use blk_init_request_from_bio() instead of open-coding it Date: Wed, 19 Apr 2017 14:01:26 -0700 Message-ID: <20170419210128.28374-4-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+he8RBh+26lusvtvPZrH3lrbF 898xDsweHce6GT0uny31+LxJLoA5issmJTUnsyy1SN8ugSvj7ZT7bAU93BV7rs1ib2BcyNnF yMkhIWAiMeXCH/YuRi4OIYGlTBIN16dCOdsYJU5Nfs0OU/V42XlWiMRmRokdh76ygiTYBIwk vr2fyQJiiwgoSPT8XskGUsQssIlRYvmXh4wgCWGBaIl/Z56CNbAIqEq8nnWCCcTmFbCXuLz1 H9QGeYmzW3Yyg9icAg4SH2/eBLOFgGr650yCqheUODnzCdgyZgFNidbtv9khbHmJ5q2zmUEW SwhsYpXYe/gDO0S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office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(39840400002)(39450400003)(39400400002)(39850400002)(39410400002)(2980300002)(438002)(199003)(189002)(9170700003)(106466001)(1076002)(33646002)(5660300001)(2870700001)(356003)(110136004)(38730400002)(23676002)(50226002)(8936002)(8676002)(81166006)(4326008)(305945005)(47776003)(76176999)(50986999)(86362001)(53936002)(6666003)(6916009)(189998001)(2950100002)(54906002)(2906002)(77096006)(36756003)(50466002)(5820100001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR04MB2234; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT008; 1:nUdqBMkUUbmlVLsrY1LLa1qOVHKQ0aR2V/NBPeWEt1VfYdoyrEKV8S+k3qtR22ysiBPl/b6OSQgP+5prWUcjjgDEMbCKdZv8UJM/FBjQUdmO/EWNBwgSUSUUZES42OBhG8BCYtYd+Vk230GMuNfmElJIoFt/toxg8xPFFhar8dr3FBkYoFihZJ+pqzaPawhhGEtyFg40NlXx/rts1K24tAHjSKNmyz4UDZi/iSyGbXeetswaL549zrbqZGd2F43N7/00vM79JTKJbWWr/qSIgbvgWl+vrSIhtXH3bWY3GRtXXzaBXm0dZFs1V3HioGb0LGdQ97EjWfabxogA6DSDUpjqaUGoO5vydxkgE03BkBfFVJbQnhLlrFKf7RDTz2tktpcTM8tevZPxcyLCjXeisb9ctVBviSPu5OkCSDmbaLbJprJLl2ImRXfvpIIEJqpqnRgQHXETEd7Nao2NfpGZqLz7ZQlDjJyBdQqMyWa9PBS2W4/fEQX/8RsOwnwdrGwVB7T9MFEZh3M5oIRDL2q32xWXqvdXqZ1WD5L2YtOsOi0= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f0caee83-bff8-467c-a6e1-08d487674518 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:CY1PR04MB2234; X-Microsoft-Exchange-Diagnostics: 1; CY1PR04MB2234; 3:ljhVB6s9JtR4XT6yxkCuTklvkWT9wFOPNmyBaYhX3nif7MU7o2cp30kgAQRta2NH5q1WfGIl6vb7NaAjTOP7AQBtLwQk1Et0E6NBofPndfF21y69G5M+utu8+RnrbT3v/d66Oam1RkurzS65aAumPdnlR5saf3Sf7VabBdgUjlYdJricNoBCsk9GqMoY/o0fSarY+nJPuEJaUmAASeI4qJUcvM6HqJyTU3F5dwj8crQTpC3W3uegjjWBy/osmdgedxUvz88wTU7kDqgFoMV99r+c3hQCrEX09Us+90cuSocanveIfCFC5KI/Z9qp/TOOR7e96ih3wyXrNSaRd3yPpYx3qHx/u8xz9ZW514PjLDgUQc6DTQhMZCgMJkZ/9/oeB0zE1ge5ZLeZefcm/nU2kQiSmeFqyFGIz6uNwan9N1ptHkL0Ao+dpoXgTw4zQpVHkb0mRTDcNRbHrooQai9sGfkuxqlttGCTR4DEe/9KsGcRIR5krfhXWtvU8ZUXRUOb7ZDqtq9FZ6W7jBX1Tq818g== X-Microsoft-Exchange-Diagnostics: 1; CY1PR04MB2234; 25:VBDSsOBz4IKff3uwFWCaQW8GdCAKxE6EY/2JHK4nEk7xxmklb0wxi5yEXFiweIbkjdhqReTIyoJerp8ZRHQv2csY7p2FVQNM5E6q1O1lJbNRv+EBphujXzxXou1WHaeocC7XD1Zj/7SBm6QWvYRsBz+/rLKChDRZnOKTCc+9SW/bxjwrnCGv/q8MOexMBn6D3Yaf8iyLFQ9UlCpxIBZUTxPa2KzbioNW9KyBsru9grzSd4GKc0avpt14Q2egmZE8jULbjfFX5IdME21ridOdDTn5LE0j1MtwsUobJgf65sN5YtN9ET9IrWI4vCA+4XdxGCl7MLqcTcc2pIM5SRXDeLTk+qgbTdgWrJct1ZzBa5XiMytJb2SWCSTmLj3RZNQzjWTjdCe0nWzc/JlJTDAgazKj4ejeCLkeVugAllU3anv2E0L0FXAsGDaDkLW/ZQ3vaLh5r7F2N/fbhp0yP4DAgw==; 31:Y+F65fCn2grf8LYFQ8Ph8wxtnjK6Ri73E8hX4E8+wfS6iRVyQNQ66f8eSoF6vaN1XF7hwgq+20b5dL1aOH6PUxIljRghpwCzCKNpKThps69Gb1GuPfBIp4ydYurE5rAToOGWI+hhcRVociRGKMudnhBD6b0Z0x9UU1VjHi20Q69k/YOsd8gRT07cnlVvzxDXaqTFCTFz/brEaWIlClNn8H+F42rJhigdfgQ1oy9fiFAifKBevllB8P/MYCblXZZylFrelOynDYhaq4bXdA/wyBUk0XgeKq9oUVrdhRYW7b4= WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CY1PR04MB2234; 20:ZtGBRd3fsDtnHh2JwWHIHuHxWBwFGB1g5j9MAMQoPBpIRPvV1u8uH8SWal3RD6DA8FosODrKB2vfte5JqcoSqNWieEfltDYvML7ayiH9/Vv7AYYR5NMV3SgiGhqB0TvK53Ksp/QnEEqNRD5IJYxWrsFPkh01E2skLIa/X+rASTsmVHT5KxqKq080jyNOVax/I4rUkgx9bXmDHJPm0zIFLkBnhqtKzlU4z/anudeCSwxM3Pn5fjYe3mxoQKe3aNE80wEUkbOEPlDvdx00U4lFk8MGQBeaL25nyY2z671LBcD1tVfsjLIjNEbcmMcC4ql4z/H9UaqOj3m/tm53waYmMuDSu8jHADwsZyzFgParyBZWHqzm90glBIAHl8Wy1jD1pyKNpKUFbIHKuzyk706kpEK9OvAglzuvC+u4R/kB0LJeg+nt3ux+AogKFugMqAXlZBmumr3hFlQIhY1FL/wHgt0XSvpsxiClVmPuaXUZsjVW/6jQdnfcYsAOHNQeRLzD 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)(13018025)(13016025)(5005006)(8121501046)(3002001)(93006095)(93004095)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148); SRVR:CY1PR04MB2234; BCL:0; PCL:0; RULEID:; SRVR:CY1PR04MB2234; X-Microsoft-Exchange-Diagnostics: 1; CY1PR04MB2234; 4:iSIzsc0RO1rTd+S5qEdbrRETCMMPVNO7RHTWlkf/53+KqbBLim2W0lb3xCZ+ARP11sMYc8swXESeYJLPCEssZRuL0sn4SyAMdZ1LIXVZhxCHhsnGbjVF+liq3IggIRf5QM0eCGYAHfOYpFHZdYZpMWjhOStMAJ0fQrFaPVOrfhFVar0501EFJUeyHiYAaiQqFbqbKDe/N/WbKI4rb4sYbo5eTgSYsNbC/jrjkdUHF7LR0cS+mXnEpHWkbDhQueh5BoGm73hg3soC3BCsHJTMLdr9TqzCKYpqrlilzSfLn8+vq9n4lb7QQmRojPi6FnuViGlKikDYQuV6onkwglmrlK/k/mAnwYQmUCCOtRmuVcPSiUKZsF/j5rjhyhHL/NqfgXsXI59sJCKEg3lA5NWJ3takhlYo1aiYjZwPono2wkaATloIGK0nFZG3TTouX0VhGzPbS8qt4vLQo+8M7qUWMFgd60SAocM0nbPXwWdnw1rDSoTnbmCGlkdYTU0LdlMct2iHZtsC1nDdp9wP4JtakUwlfuYjFap0Jp6HiXGl83itOxeabRpr4y061GjvNwYEJPL3R/ubXQs3u4UGUj6pUgtag3JpGvqjumkpf4hagMN6bxmE85gOV2wmjSsUDF3+F4wbFufQYyeSZH9kpwgGSueE9AKNhIzRW9mmIjGiBjnvfWhvyy89ePH0aEkB3qJHOLnBd7NJxOfnDR0XugDgrmB/6r+NtMFjVh3cvHxuWHtT+Q7PwmCiRpV/oNDsghPgDWfeT6r8SGd0QLuTwUUktHZFexBH3G6gDbLLJCmEXIIWZ3a4NgDNMCEOSs0c555l X-Forefront-PRVS: 028256169F X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjA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jdEM8mugHl/T+asyY/mLWfQK/XYAlPzHtDsd75ZZ23e8WL+nGIQPQrT0I9v1um084t9s0XWUTy+2wxiobAdENUMWTkoH2o2st0WfQsRwYbGRTuTw3+OJI3aPvA+oMnXI5XyzFNkUs3jIEMD+XrD8eQ4TRriSVo77daqO8j8ovFf+DchcPPIkLpeBEpVUvkkEvwmKs=; 5:tojCdytdkdMzlgcEPudk6TDsTgmYLI1Mr8sfNKSv/AxjI30iQyjOoylAkuI9eX42SXho2l22tANG0CMhAqYECJxqMB+UOyABFj9PQJgxcblCAv3H6QElYLqB5yZTlOYc15Ty8qmi8QAq16eM3T7HGg==; 24:klwz7++DCyW9TdkBVW+QZEi2OOW6vv4bJDPQBCgydzLjpeos5FjiLTTuX5aV9ar6u+tGoFM4grQWSDPGIkPOiGlzchlKhjz5AH3+gTd0cNM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR04MB2234; 7:Dg69hxS+ic6e+7Bb9DWuNGuiFN524xUBG0wsIrUTPWrKXH0wyqWFThcm+5xDT4fEx53DiVwl3/cnG9ShsykyLX+GRvLm6e/6wqCRAqu6gbjFpOvQ4DmwdcBoS75uP/zGS3T4NUMqRKoFb1M73rfHqFts7u6iYchoUsjuEpQLUZDO7O4Ozk49Y33vBTfXr/TOnnPYJ/Ps8HrhXarq14EJ9Q5QDBst8y7nkcpiUakXQ7G3lGahJuIdz7PimTvp9uZBF0OBXxqhL123RX7cmJbxmB2haieaxyrothix7ohRUAYCktePLvYO3nOY15YQbMfrqfDUq2j2wArLflIFCf+ByA==; 20:GqLOcpoLSWpGTcd9jMbG8otFHYw7Chv1K1sfGgbgJPNIpNUg6bNdQevdYtlOiaexqbYVR0rACVw8Gj8f2Ppp3FPF0meWLcWPWAsY8eyNNcG/MrUapWC1ebSBoMB3avyVpBzP2/RY/7M9XfJG8ncf3i9Y0a/XmWkkpaDHubsWYrM= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2017 21:01:37.4363 (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: CY1PR04MB2234 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 lightnvm driver 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. * The bio sector offset is copied into req->__sector instead of retaining the value -1 set by blk_mq_alloc_request(). * 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/nvme/host/lightnvm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 4b78090518e1..b76e2e36fef4 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -511,11 +511,7 @@ static int nvme_nvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd) rq->cmd_flags &= ~REQ_FAILFAST_DRIVER; if (bio) { - rq->ioprio = bio_prio(bio); - rq->__data_len = bio->bi_iter.bi_size; - rq->bio = rq->biotail = bio; - if (bio_has_data(bio)) - rq->nr_phys_segments = bio_phys_segments(q, bio); + blk_init_request_from_bio(rq, bio); } else { rq->ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, IOPRIO_NORM); rq->__data_len = 0;