lightnvm: allow to init targets on factory mode
authorJavier González <jg@lightnvm.io>
Sat, 15 Apr 2017 18:55:45 +0000 (20:55 +0200)
committerJens Axboe <axboe@fb.com>
Sun, 16 Apr 2017 16:06:25 +0000 (10:06 -0600)
commit4af3f75d7992dd0dc49da95fbc039fa3806fba4f
treec180773ceb2e5e1b3ca1edd06a9cc84c41525f3d
parente85292feb98ca8ba4dcd6b5d33e1214a4b54512d
lightnvm: allow to init targets on factory mode

Target initialization has two responsibilities: creating the target
partition and instantiating the target. This patch enables to create a
factory partition (e.g., do not trigger recovery on the given target).
This is useful for target development and for being able to restore the
device state at any moment in time without requiring a full-device
erase.

Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/core.c
drivers/lightnvm/rrpc.c
include/linux/lightnvm.h
include/uapi/linux/lightnvm.h