]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
lightnvm: move block fold outside of get_bb_tbl()
authorMatias Bjørling <m@bjorling.me>
Fri, 6 May 2016 18:02:58 +0000 (20:02 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 6 May 2016 18:51:10 +0000 (12:51 -0600)
commit22e8c9766a669d49cf3749d397082a5cd93374a9
treec24facba8321c5359bf6f111f2ca892cf894b62a
parent4891d120b9cd419f4350b11e1231083745dcdc8b
lightnvm: move block fold outside of get_bb_tbl()

The get block table command returns a list of blocks and planes
with their associated state. Users, such as gennvm and sysblk,
manages all planes as a single virtual block.

It was therefore  natural to fold the bad block list before it is
returned. However, to allow users, which manages on a per-plane
block level, to also use the interface, the get_bb_tbl interface is
changed to not fold by default and instead let the caller fold if
necessary.

Reviewed by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/core.c
drivers/lightnvm/gennvm.c
drivers/lightnvm/sysblk.c
drivers/nvme/host/lightnvm.c
include/linux/lightnvm.h