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>
This commit is contained in:

committed by
Jens Axboe

parent
e85292feb9
commit
4af3f75d79
@@ -85,6 +85,10 @@ struct nvm_ioctl_create_conf {
|
||||
};
|
||||
};
|
||||
|
||||
enum {
|
||||
NVM_TARGET_FACTORY = 1 << 0, /* Init target in factory mode */
|
||||
};
|
||||
|
||||
struct nvm_ioctl_create {
|
||||
char dev[DISK_NAME_LEN]; /* open-channel SSD device */
|
||||
char tgttype[NVM_TTYPE_NAME_MAX]; /* target type name */
|
||||
|
Reference in New Issue
Block a user