Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1732865
| From | "Javier González" <jg@lightnvm.io> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] lightnvm: pblk: ensure right bad block calculation |
| Date | 2017-09-15 14:40 +0200 |
| Message-ID | <upY4y-2MI-17@gated-at.bofh.it> (permalink) |
| References | <upY4y-2MI-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Make sure that the variable controlling block threshold for allocating extra metadata sectors in case of a line with bad blocks does not get a negative value. Otherwise, the line will be marked as corrupted and wasted. Signed-off-by: Javier González <javier@cnexlabs.com> --- drivers/lightnvm/pblk-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index 9d9adcf3e141..7cf4b536d899 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c @@ -707,7 +707,7 @@ static int pblk_lines_init(struct pblk *pblk) goto add_emeta_page; } - lm->emeta_bb = geo->nr_luns - i; + lm->emeta_bb = geo->nr_luns > i ? geo->nr_luns - i : 0; lm->min_blk_line = 1; if (geo->nr_luns > 1) -- 2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] lightnvm: pblk: check lba sanity on read path "Javier González" <jg@lightnvm.io> - 2017-09-15 14:40 +0200 [PATCH] lightnvm: pblk: enable 1 LUN configuration "Javier González" <jg@lightnvm.io> - 2017-09-15 14:40 +0200 [PATCH] lightnvm: pblk: ensure right bad block calculation "Javier González" <jg@lightnvm.io> - 2017-09-15 14:40 +0200 [PATCH] lightnvm: pblk: remove I/O dependency on write path "Javier González" <jg@lightnvm.io> - 2017-09-15 14:40 +0200 [PATCH] lightnvm: pblk: guarantee line integrity on reads "Javier González" <jg@lightnvm.io> - 2017-09-15 14:40 +0200
csiph-web