From patchwork Tue Jan 31 12:17:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 9547033 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 51FF4604DE for ; Tue, 31 Jan 2017 12:19:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43D23280FC for ; Tue, 31 Jan 2017 12:19:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38BCD28372; Tue, 31 Jan 2017 12:19:04 +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 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 A692B28338 for ; Tue, 31 Jan 2017 12:19:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752043AbdAaMS7 (ORCPT ); Tue, 31 Jan 2017 07:18:59 -0500 Received: from mail-bn3nam01on0043.outbound.protection.outlook.com ([104.47.33.43]:32224 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751513AbdAaMST (ORCPT ); Tue, 31 Jan 2017 07:18:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cnexlabs.onmicrosoft.com; s=selector1-cnexlabs-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=MTA36tzXnw6idpijb+lG1ei6KoP2fwDQOHfjTQU23cM=; b=hFzfFFm/aoCSdPsyz9YBuGamAkVgoNhSz7lJbaaPwPSGzRH7mwyu7lkIOEJQYm+Kn7Aul+yS8CQamN4aeWMPvb9mnqi2RB4Lsc7nAM/LFhySRXMXnJYU86t+U1qdAB9RAw5gPlJ765H0qe4tCA2L0BZfA6O0dzZEltJ0LBB2hiQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matias@cnexlabs.com; Received: from skyninja.cnexlabs.com (193.106.164.211) by DM5PR06MB2777.namprd06.prod.outlook.com (10.175.107.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12; Tue, 31 Jan 2017 12:17:58 +0000 From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: CC: , , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 09/12] lightnvm: use end_io callback instead of instance Date: Tue, 31 Jan 2017 13:17:17 +0100 Message-ID: <20170131121720.10971-10-matias@cnexlabs.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170131121720.10971-1-matias@cnexlabs.com> References: <20170131121720.10971-1-matias@cnexlabs.com> MIME-Version: 1.0 X-Originating-IP: [193.106.164.211] X-ClientProxiedBy: DB6PR0601CA0024.eurprd06.prod.outlook.com (10.168.88.162) To DM5PR06MB2777.namprd06.prod.outlook.com (10.175.107.139) X-MS-Office365-Filtering-Correlation-Id: 048e0a82-627e-4ca4-8260-08d449d331cc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM5PR06MB2777; X-Microsoft-Exchange-Diagnostics: 1; DM5PR06MB2777; 3:LUOE9wlzjgjoE1/+FqRr4BQvu0B6wu3VAJdWb2Fr4DRQmIEedPra0aMqXWPa/mqrv+hWaV+U7yodb8UaHlRcdnXsNThQ+hHMu+o4Tak8AWk+qunLgmmzEhZk+Wib0f8fwl1GeR5+OfK04zAmV2NiBT9hMrbPKf50jonO2tSv1Kz4EUTi/Dsy3gCGMDclhbfqJSJ7POIJSfIwopK97fR92f8dLeYrxqI1aCDsklisdEibshnL6t51FY6NrYaN5QncUVtW2ldDOeNi4RL9xpkSig== X-Microsoft-Exchange-Diagnostics: 1; DM5PR06MB2777; 25:9JX9023K8Xqd0cexSdF0e22slxrsum3MZZwYd62cquZEgVEeMz5EokOSqltpEjKiEZYGqFJM+CJGK4o/n2G4ynLQgivtFjuPbo9bCwFDFQlldSfaMgxHt9MjDMf1RGbkfGRCfFffxRBMz+tYOoTAbqYp2KKJNAWaZnmc4KAP0t62sEVpnva42OZRWyhp5bAT00E7G7iEaT/KTj7kBoCST0NQQyr8aNj87tKQXUugNZuCtrV+4pbERm/kxCvIJn3bBCbTv+7eBxF5zypgKL6kvNLZRBJn3TAWGN2Ose0eN8TcXrUjnFpQyVrVwGVMYtQ8RY7dW0gK26Z05bjrZqQ2yEEruBnjrzdmZXPXO0As/k5GTVwCh2+bB1JM0MxwQFh53udXnaLs/pkTAc9qYG8znku33Z+kPqRcoKihCtqM8UapihA03L9vD328VvmQrxmQOB915vdTKbSuLiLf3PW5aKIF5uYtETVXBsQNh7Nt6UcFpbzjYqOpD2bQaDY1Q43eX4tqoANgRMBaK+eXJCAxXQl0nLV4egu5reQvQzFYbXdKGYO58DtkXk9N4KfajcZPZMf3UWF16TGmqKW5/5yNYQp7dpU0/NMrF8H0DBAOzlEs0c6S5KnSqKQfsGSj8WUuMq6ifGqav6HzbnbyZPRlkdvQq6tn70H9xQeRO8QBqjHOvjYH2+8Ww/EoIckr6/h44KQD+4d36gFI/Tz9zVvg8Q== X-Microsoft-Exchange-Diagnostics: 1; DM5PR06MB2777; 31:Im5QJ/pZ44EsXinLxa6GbDaSbSb1lpApwOjwb2u4cipW345nTm5Siq7RkwEfwpE+jvgqtIysjjvuaEaLvZESK2yB34/FHchVXotq6rh64/5SwWB/xr0ITm+cFDEHx1vqlxBwHxySGURuNZBMiYdgjBxHvOiX7WoS6sGFIZVRpO4ARopbMWZipd8ZrlTdrz6iZIqLP9KNQWMQCS/l/9AbFQYNfijSSZwXYyqFm53yW0XlUmr7AH8H0FKctm1QlbUt; 20:fmCUiRzU6A6s/ophpyPtHKFesZEaDyFxvkHRtKaoOUhcocGf7Z7HN0TY4NQS5AiX27J5jLqbI/GfZCT6lrqBA+UudTLISdry5g+xnu7Nq0sMMQkLYp4ofwTJgd98MHK3NhTyuZNuNjlvPaVmjx5eic6tkRWGcgUleFh5EOh9zlI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:DM5PR06MB2777; BCL:0; PCL:0; RULEID:; SRVR:DM5PR06MB2777; X-Microsoft-Exchange-Diagnostics: 1; DM5PR06MB2777; 4:yG6bofQTX6ZpmWpRay3QYcvV0W6j/QefbTMfTXYL5iJVIuxoEHOH/haUxxzhqweZW35oSpHcujZzvmgeJJk3cb9DmaZiIAgV/G+S/XNYwSWm/qfIZrnECLo2zCw6KsXnRNaawg9Wf8y5RAkVR2kmqf3+sIk0J6qJhBqrfVn0VRbaaxRd/DN2KuGUJVQIvImjs1HYRhEzULuyW8wRicJdgWHOP/7wkBxH+SY8t8pe2M7eKTW8s58HpPLNYvcX8IKesaJS4J2eBduAukA0dO8FCt6Vv2FYjfbXOSbjLdkc50xR/pxEUnZ5UdzXUWAgtnpzPRhKhIKAlwA7fw6Ak2Nub94I1lJ8ThSSKAWxyiulTJC/RHyEdqxQaCY28oGU59WVf9I3aWd69LN1TilVS8m0p8GzBp+OgJeu5N5mSEFzAKK6+O7ZJ6LlyZhHh/VM17S09yR33HQvKr8bnkjbFFTCyCgDjvGJKgDJnBXVHN7dhdqTjiaNRIJs8zzTAhYGQkqNRl6V0Iu/8d2NdHYuYysA7+aKNqIr0PJPRxBX+BZnxhiN56PzWWzp62x3vseM1Bqk0aN0gDK/0ZpoI8pZwCxxKg== X-Forefront-PRVS: 0204F0BDE2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(189002)(199003)(42186005)(66066001)(50466002)(6486002)(47776003)(38730400001)(105586002)(54906002)(25786008)(106356001)(2351001)(36756003)(68736007)(4001430100002)(53416004)(50986999)(107886002)(7736002)(2906002)(305945005)(4326007)(110136003)(23676002)(575784001)(2870700001)(189998001)(5660300001)(92566002)(86362001)(1076002)(6116002)(3846002)(33646002)(6916009)(97736004)(2950100002)(5820100001)(6666003)(76176999)(101416001)(53936002)(81166006)(81156014)(8676002)(50226002)(69596002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR06MB2777; H:skyninja.cnexlabs.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cnexlabs.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjA2TUIyNzc3OzIzOjNkblpCVkpwcWdrdXhHR0xLWjRlQlV6K2Vo?= =?utf-8?B?bk5uK3p5Q2Y2bzhKTkxMcmRDV3UrTTc1REdtVUsxTjVuRU1pbFZMOTQra1lY?= =?utf-8?B?dzA4MmMwZ3RmaTNPQVVmMUs3N2hXd0xNNGpsVjIrYldva3FJT1NrU240UTNI?= =?utf-8?B?UU4vYnFJUUZYS2huNjZ2Zy9McTNWTzNXMU9URVdhYzNSTWhMN2g3cXpwam9S?= =?utf-8?B?WmU2bDMzd2VUdWZLNVE5dndnaXQ3MHZuNzM3dVJHUTZCUHVzQS9qZnBOd1dX?= =?utf-8?B?OTNQUHJlaE83c2VyRmNhZ1Z6T3phdk1FaEpUMk1YWXRBcU1ueElPSEJ6eUFT?= =?utf-8?B?YUhZMENHellsekQyOUtMblZkRHpLQ2dCc3djVXdpVDV6YzYvT3NrOWR3M1dI?= =?utf-8?B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Bw7hJcDbygmgDHMWg==; 24:MaObSqMn5DijfELithHK/o6klkE3YUb24sx/HA05rqUA+roR06oqksewiVcsPCxK9e6RDgeUHGuvkrGQuspA670yxyFk3bGMlJ6AAGnTguo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR06MB2777; 7:zsFFpd7alcii9W36ek7WoGZAfgE9ySdOeELzqdI8AvUDYPxh65IWMr0ZHAVwZyNsb92RoRYIdNUraGpFh0in3Qgz8lJBo6HW5YfBI5FMSwE6JaNB1GrskQ03IxPzQJDEGNE045OiI0D/MVXZYS01/dL2rIg+gUghZHEBW8qRC4HneuuKTZL5Gp8ElITMW0ZauxVgPnhE1o0tE86w/hhZqVj+OIBSl3U/NQA4dtR1EzvCRLa5dbPt/GLqDQxjA9uIe9kRKYM6DVHrbdD5xGIhzVWsrlf1XzsQ7r+bK8W09bPhP0LdxWoOmn7S6M0SzVHlTLdFwV9B7SafZ9JtNN30S+RNKQzQYsq0WyIS8Vr8ymLQqHVyJF/6YAJGlw9I6gqPaIY3JBTHFf48egUY6dl9eok7Vzm148TPNhq6e1UQ2dNaGgFUqklHMk9N8q9UdlAvPSo8NA6EsofO4MGiU7vANlgFkIXxUG3m6Ykx6bKWQYWFy+bggtUlu0X/a0Dn3M+auFqMvcwUiKdEmd9dNo8mCS6cETDkFGZcaTZ2gEgVyFGovflWNLpIeh0pT2ajBmgg X-OriginatorOrg: cnexlabs.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2017 12:17:58.0219 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR06MB2777 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 When the lightnvm core had the "gennvm" layer between the device and the target, there was a need for the core to be able to figure out which target it should send an end_io callback to. Leading to a "double" end_io, first for the media manager instance, and then for the target instance. Now that core and gennvm is merged, there is no longer a need for this, and a single end_io callback will do. Signed-off-by: Matias Bjørling --- drivers/block/null_blk.c | 3 ++- drivers/lightnvm/core.c | 7 +++---- drivers/lightnvm/rrpc.c | 7 +++---- drivers/lightnvm/rrpc.h | 3 --- drivers/nvme/host/lightnvm.c | 3 ++- include/linux/lightnvm.h | 10 +++------- 6 files changed, 13 insertions(+), 20 deletions(-) diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index e666095..a67b7ea 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -420,7 +420,8 @@ static void null_lnvm_end_io(struct request *rq, int error) { struct nvm_rq *rqd = rq->end_io_data; - nvm_end_io(rqd, error); + rqd->error = error; + nvm_end_io(rqd); blk_put_request(rq); } diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index 80cd767..4f4db99 100644 --- a/drivers/lightnvm/core.c +++ b/drivers/lightnvm/core.c @@ -773,17 +773,16 @@ void nvm_free_rqd_ppalist(struct nvm_dev *dev, struct nvm_rq *rqd) } EXPORT_SYMBOL(nvm_free_rqd_ppalist); -void nvm_end_io(struct nvm_rq *rqd, int error) +void nvm_end_io(struct nvm_rq *rqd) { struct nvm_tgt_dev *tgt_dev = rqd->dev; - struct nvm_tgt_instance *ins = rqd->ins; /* Convert address space */ if (tgt_dev) nvm_rq_dev_to_tgt(tgt_dev, rqd); - rqd->error = error; - ins->tt->end_io(rqd); + if (rqd->end_io) + rqd->end_io(rqd); } EXPORT_SYMBOL(nvm_end_io); diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index 9fb7de3..e00b1d7 100644 --- a/drivers/lightnvm/rrpc.c +++ b/drivers/lightnvm/rrpc.c @@ -779,7 +779,7 @@ static void rrpc_end_io_write(struct rrpc *rrpc, struct rrpc_rq *rrqd, static void rrpc_end_io(struct nvm_rq *rqd) { - struct rrpc *rrpc = container_of(rqd->ins, struct rrpc, instance); + struct rrpc *rrpc = rqd->private; struct nvm_tgt_dev *dev = rrpc->dev; struct rrpc_rq *rrqd = nvm_rq_to_pdu(rqd); uint8_t npages = rqd->nr_ppas; @@ -972,8 +972,9 @@ static int rrpc_submit_io(struct rrpc *rrpc, struct bio *bio, bio_get(bio); rqd->bio = bio; - rqd->ins = &rrpc->instance; + rqd->private = rrpc; rqd->nr_ppas = nr_pages; + rqd->end_io = rrpc_end_io; rrq->flags = flags; err = nvm_submit_io(dev, rqd); @@ -1532,7 +1533,6 @@ static void *rrpc_init(struct nvm_tgt_dev *dev, struct gendisk *tdisk) if (!rrpc) return ERR_PTR(-ENOMEM); - rrpc->instance.tt = &tt_rrpc; rrpc->dev = dev; rrpc->disk = tdisk; @@ -1611,7 +1611,6 @@ static struct nvm_tgt_type tt_rrpc = { .make_rq = rrpc_make_rq, .capacity = rrpc_capacity, - .end_io = rrpc_end_io, .init = rrpc_init, .exit = rrpc_exit, diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h index 94e4d73..fdb6ff9 100644 --- a/drivers/lightnvm/rrpc.h +++ b/drivers/lightnvm/rrpc.h @@ -102,9 +102,6 @@ struct rrpc_lun { }; struct rrpc { - /* instance must be kept in top to resolve rrpc in unprep */ - struct nvm_tgt_instance instance; - struct nvm_tgt_dev *dev; struct gendisk *disk; diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 3b6cd9b..21cac85 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -484,7 +484,8 @@ static void nvme_nvm_end_io(struct request *rq, int error) struct nvm_rq *rqd = rq->end_io_data; rqd->ppa_status = nvme_req(rq)->result.u64; - nvm_end_io(rqd, error); + rqd->error = error; + nvm_end_io(rqd); kfree(nvme_req(rq)->cmd); blk_mq_free_request(rq); diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index ce0b2da..17cd454 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -213,10 +213,6 @@ struct nvm_target { struct gendisk *disk; }; -struct nvm_tgt_instance { - struct nvm_tgt_type *tt; -}; - #define ADDR_EMPTY (~0ULL) #define NVM_VERSION_MAJOR 1 @@ -227,7 +223,6 @@ struct nvm_rq; typedef void (nvm_end_io_fn)(struct nvm_rq *); struct nvm_rq { - struct nvm_tgt_instance *ins; struct nvm_tgt_dev *dev; struct bio *bio; @@ -251,6 +246,8 @@ struct nvm_rq { u64 ppa_status; /* ppa media status */ int error; + + void *private; }; static inline struct nvm_rq *nvm_rq_from_pdu(void *pdu) @@ -450,7 +447,6 @@ struct nvm_tgt_type { /* target entry points */ nvm_tgt_make_rq_fn *make_rq; nvm_tgt_capacity_fn *capacity; - nvm_end_io_fn *end_io; /* module-specific init/teardown */ nvm_tgt_init_fn *init; @@ -484,7 +480,7 @@ extern int nvm_get_l2p_tbl(struct nvm_tgt_dev *, u64, u32, nvm_l2p_update_fn *, void *); extern int nvm_get_area(struct nvm_tgt_dev *, sector_t *, sector_t); extern void nvm_put_area(struct nvm_tgt_dev *, sector_t); -extern void nvm_end_io(struct nvm_rq *, int); +extern void nvm_end_io(struct nvm_rq *); extern int nvm_bb_tbl_fold(struct nvm_dev *, u8 *, int); extern int nvm_get_tgt_bb_tbl(struct nvm_tgt_dev *, struct ppa_addr, u8 *);