Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1531694

[PATCH 11/23] lightnvm: remove unnecessary variables in rrpc

From Matias Bjørling <m@bjorling.me>
Newsgroups linux.kernel
Subject [PATCH 11/23] lightnvm: remove unnecessary variables in rrpc
Date 2016-11-28 22:50 +0100
Message-ID <sIBYd-7z9-5@gated-at.bofh.it> (permalink)
References <sIBOx-7vt-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Javier González <jg@lightnvm.io>

Before vectored I/Os were supported on rrpc, the physical address was
stored as part of the nvm_rqd request. This variable become obsolete
when the ppa_list was introduced. Cleanup this variable.

Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
---
 drivers/lightnvm/rrpc.c | 6 ------
 drivers/lightnvm/rrpc.h | 3 ---
 2 files changed, 9 deletions(-)

diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index 9253acc..34d2ebf 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -758,7 +758,6 @@ static int rrpc_read_ppalist_rq(struct rrpc *rrpc, struct bio *bio,
 static int rrpc_read_rq(struct rrpc *rrpc, struct bio *bio, struct nvm_rq *rqd,
 							unsigned long flags)
 {
-	struct rrpc_rq *rrqd = nvm_rq_to_pdu(rqd);
 	int is_gc = flags & NVM_IOTYPE_GC;
 	sector_t laddr = rrpc_get_laddr(bio);
 	struct rrpc_addr *gp;
@@ -778,7 +777,6 @@ static int rrpc_read_rq(struct rrpc *rrpc, struct bio *bio, struct nvm_rq *rqd,
 	}
 
 	rqd->opcode = NVM_OP_HBREAD;
-	rrqd->addr = gp;
 
 	return NVM_IO_OK;
 }
@@ -821,7 +819,6 @@ static int rrpc_write_ppalist_rq(struct rrpc *rrpc, struct bio *bio,
 static int rrpc_write_rq(struct rrpc *rrpc, struct bio *bio,
 				struct nvm_rq *rqd, unsigned long flags)
 {
-	struct rrpc_rq *rrqd = nvm_rq_to_pdu(rqd);
 	struct rrpc_addr *p;
 	int is_gc = flags & NVM_IOTYPE_GC;
 	sector_t laddr = rrpc_get_laddr(bio);
@@ -839,7 +836,6 @@ static int rrpc_write_rq(struct rrpc *rrpc, struct bio *bio,
 
 	rqd->ppa_addr = rrpc_ppa_to_gaddr(rrpc->dev, p->addr);
 	rqd->opcode = NVM_OP_HBWRITE;
-	rrqd->addr = p;
 
 	return NVM_IO_OK;
 }
@@ -1389,7 +1385,6 @@ static void *rrpc_init(struct nvm_dev *dev, struct gendisk *tdisk,
 	INIT_WORK(&rrpc->ws_requeue, rrpc_requeue);
 
 	rrpc->nr_luns = lun_end - lun_begin + 1;
-	rrpc->total_blocks = (unsigned long)dev->blks_per_lun * rrpc->nr_luns;
 	rrpc->nr_sects = (unsigned long long)dev->sec_per_lun * rrpc->nr_luns;
 
 	/* simple round-robin strategy */
@@ -1409,7 +1404,6 @@ static void *rrpc_init(struct nvm_dev *dev, struct gendisk *tdisk,
 	}
 
 	rrpc->poffset = dev->sec_per_lun * lun_begin;
-	rrpc->lun_offset = lun_begin;
 
 	ret = rrpc_core_init(rrpc);
 	if (ret) {
diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h
index 5e87d52..bed49ba 100644
--- a/drivers/lightnvm/rrpc.h
+++ b/drivers/lightnvm/rrpc.h
@@ -48,7 +48,6 @@ struct rrpc_inflight_rq {
 
 struct rrpc_rq {
 	struct rrpc_inflight_rq inflight_rq;
-	struct rrpc_addr *addr;
 	unsigned long flags;
 };
 
@@ -92,14 +91,12 @@ struct rrpc {
 
 	sector_t soffset; /* logical sector offset */
 	u64 poffset; /* physical page offset */
-	int lun_offset;
 
 	int nr_luns;
 	struct rrpc_lun *luns;
 
 	/* calculated values */
 	unsigned long long nr_sects;
-	unsigned long total_blocks;
 
 	/* Write strategy variables. Move these into each for structure for each
 	 * strategy
-- 
2.9.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/23] LightNVM patches for 4.10 Matias Bjørling <m@bjorling.me> - 2016-11-28 22:40 +0100
  [PATCH 16/23] lightnvm: remove get_lun operation on gennvm Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 11/23] lightnvm: remove unnecessary variables in rrpc Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 05/23] lightnvm: export set bad block table Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 01/23] nvme: lightnvm: frees wrong cmd structure Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 13/23] lightnvm: remove gen_lun abstraction Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 21/23] lightnvm: introduce max_phys_sects helper function Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 14/23] lightnvm: manage lun partitions internally in mm Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 04/23] lightnvm: do not protect block 0 Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 20/23] lightnvm: introduce helpers for generic ops in rrpc Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 03/23] lightnvm: enable to send hint to erase command Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 09/23] lightnvm: cleanup unused target operations Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 17/23] lightnvm: remove debug lun statistics from gennvm Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 07/23] lightnvm: rrpc: split bios of size > 256kb Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 12/23] lightnvm: use constant name instead of value Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 02/23] nvme: lightnvm: attach lightnvm sysfs to nvme block device Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 08/23] lightnvm: remove sysfs configuration interface Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 19/23] lightnvm: eliminate nvm_lun abstraction in mm Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 10/23] lightnvm: make address conversion functions global Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 22/23] lightnvm: use target nvm on target-specific ops. Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 23/23] lightnvm: transform target get/set bad block Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 18/23] lightnvm: eliminate nvm_block abstraction on mm Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100
  [PATCH 06/23] lightnvm: add ECC error codes Matias Bjørling <m@bjorling.me> - 2016-11-28 22:50 +0100

csiph-web