aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/lightnvm.h
diff options
context:
space:
mode:
authorJavier González <jg@lightnvm.io>2017-04-15 20:55:45 +0200
committerJens Axboe <axboe@fb.com>2017-04-16 10:06:25 -0600
commit4af3f75d7992dd0dc49da95fbc039fa3806fba4f (patch)
treec180773ceb2e5e1b3ca1edd06a9cc84c41525f3d /include/uapi/linux/lightnvm.h
parentlightnvm: bad type conversion for nvme control bits (diff)
downloadlinux-dev-4af3f75d7992dd0dc49da95fbc039fa3806fba4f.tar.xz
linux-dev-4af3f75d7992dd0dc49da95fbc039fa3806fba4f.zip
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>
Diffstat (limited to 'include/uapi/linux/lightnvm.h')
-rw-r--r--include/uapi/linux/lightnvm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/lightnvm.h b/include/uapi/linux/lightnvm.h
index fd19f36b3129..c8aec4b9e73b 100644
--- a/include/uapi/linux/lightnvm.h
+++ b/include/uapi/linux/lightnvm.h
@@ -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 */