linux/drivers/lightnvm
Hans Holmberg 75610cd974 lightnvm: pblk: consider bad sectors in emeta during recovery
When recovering lines we need to consider that bad blocks in a line
affect the emeta area size.

Previously it was assumed that the emeta area would grow by the
number of sectors per page * number of bad blocks in the line.

This assumption is not correct - the number of "extra" pages that are
consumed could be both smaller (depending on emeta size) and bigger
(depending on the placement of the bad blocks).

Fix this by calculating the emeta start by iterating backwards
through the line, skipping ppas that map to bad blocks.

Also fix the data types used for ppa indices/counts in
pblk_recov_l2p_from_emeta - we should use u64.

Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-10-13 08:34:57 -06:00
..
core.c lightnvm: remove stale extern and unused exported symbols 2017-10-13 08:34:57 -06:00
Kconfig lightnvm: include NVM Express driver if OCSSD is selected for build 2017-10-13 08:34:57 -06:00
Makefile lightnvm: physical block device (pblk) target 2017-04-16 10:06:33 -06:00
pblk-cache.c lightnvm: pblk: simplify path on REQ_PREFLUSH 2017-10-13 08:34:57 -06:00
pblk-core.c lightnvm: pblk: remove useless line 2017-10-13 08:34:57 -06:00
pblk-gc.c lightnvm: pblk: start gc if needed during init 2017-10-13 08:34:57 -06:00
pblk-init.c lightnvm: pblk: start gc if needed during init 2017-10-13 08:34:57 -06:00
pblk-map.c lightnvm: pblk: enable 1 LUN configuration 2017-10-13 08:34:57 -06:00
pblk-rb.c lightnvm: pblk: reduce arguments in __pblk_rb_update_l2p 2017-10-13 08:34:57 -06:00
pblk-read.c lightnvm: pblk: remove redundant check on read path 2017-10-13 08:34:57 -06:00
pblk-recovery.c lightnvm: pblk: consider bad sectors in emeta during recovery 2017-10-13 08:34:57 -06:00
pblk-rl.c lightnvm: pblk: start gc if needed during init 2017-10-13 08:34:57 -06:00
pblk-sysfs.c lightnvm: pblk: remove unused return variable 2017-06-30 11:08:18 -06:00
pblk-write.c lightnvm: pblk: remove I/O dependency on write path 2017-10-13 08:34:57 -06:00
pblk.h lightnvm: pblk: start gc if needed during init 2017-10-13 08:34:57 -06:00
rrpc.c blk: remove bio_set arg from blk_queue_split() 2017-06-18 12:40:59 -06:00
rrpc.h lightnvm: use end_io callback instead of instance 2017-01-31 08:32:13 -07:00