Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1531712
| From | Matias Bjørling <m@bjorling.me> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 12/23] lightnvm: use constant name instead of value |
| Date | 2016-11-28 22:50 +0100 |
| Message-ID | <sIBYf-7z9-75@gated-at.bofh.it> (permalink) |
| References | <sIBOx-7vt-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Javier González <jg@lightnvm.io>
There is a constant to refer to free blocks. Use it when marking bad
blocks instead of using a constant value
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
---
drivers/lightnvm/gennvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c
index e969e3a..aee5b72 100644
--- a/drivers/lightnvm/gennvm.c
+++ b/drivers/lightnvm/gennvm.c
@@ -279,7 +279,7 @@ static int gen_block_bb(struct gen_dev *gn, struct ppa_addr ppa,
lun = &gn->luns[(dev->luns_per_chnl * ppa.g.ch) + ppa.g.lun];
for (i = 0; i < nr_blks; i++) {
- if (blks[i] == 0)
+ if (blks[i] == NVM_BLK_T_FREE)
continue;
blk = &lun->vlun.blocks[i];
--
2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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