lightnvm: eliminate nvm_lun abstraction in mm
authorJavier González <jg@lightnvm.io>
Mon, 28 Nov 2016 21:39:10 +0000 (22:39 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 29 Nov 2016 15:01:17 +0000 (08:01 -0700)
commit59d22ad8173ff0e1d1a1d4f0eed1d8930f692c8b
treec4e2e7600ada505ac12b7bd85ba7607c016c9939
parent3173238bc00933864ce9888fa9ea73edd465dcb1
lightnvm: eliminate nvm_lun abstraction in mm

In order to naturally support multi-target instances on an Open-Channel
SSD, targets should own the LUNs they get blocks from and manage
provisioning internally. This is done in several steps.

Since targets own the LUNs the are instantiated on top of and manage the
free block list internally, there is no need for a LUN abstraction in
the media manager. LUNs are intrinsically managed as in the physical
layout (ch:0,lun:0, ..., ch:0,lun:n, ch:1,lun:0, ch:1,lun:n, ...,
ch:m,lun:0, ch:m,lun:n) and given to the targets based on the target
creation ioctl. This simplifies LUN management and clears the path for a
partition manager to sit directly underneath LightNVM targets.

Signed-off-by: Javier González <javier@cnexlabs.com>
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/gennvm.h
drivers/lightnvm/rrpc.c
drivers/lightnvm/rrpc.h
drivers/nvme/host/lightnvm.c
include/linux/lightnvm.h