aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/lightnvm.h
diff options
context:
space:
mode:
authorMatias Bjørling <m@bjorling.me>2016-01-12 07:49:37 +0100
committerJens Axboe <axboe@fb.com>2016-01-12 08:21:18 -0700
commit5569615424613aa006005f18b03a3a12738a47d7 (patch)
tree340aeb95fc2416c298107aaa5f18fdb453c3493d /include/uapi/linux/lightnvm.h
parentlightnvm: core on-disk initialization (diff)
downloadlinux-dev-5569615424613aa006005f18b03a3a12738a47d7.tar.xz
linux-dev-5569615424613aa006005f18b03a3a12738a47d7.zip
lightnvm: introduce ioctl to initialize device
Based on the previous patch, we now introduce an ioctl to initialize the device using nvm_init_sysblock and create the necessary system blocks. The user may specify the media manager that they wish to instantiate on top. Default from user-space will be "gennvm". Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/uapi/linux/lightnvm.h')
-rw-r--r--include/uapi/linux/lightnvm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/uapi/linux/lightnvm.h b/include/uapi/linux/lightnvm.h
index 0171b85e7efc..56339e2e0a46 100644
--- a/include/uapi/linux/lightnvm.h
+++ b/include/uapi/linux/lightnvm.h
@@ -101,6 +101,12 @@ struct nvm_ioctl_remove {
__u32 flags;
};
+struct nvm_ioctl_dev_init {
+ char dev[DISK_NAME_LEN]; /* open-channel SSD device */
+ char mmtype[NVM_MMTYPE_LEN]; /* register to media manager */
+
+ __u32 flags;
+};
/* The ioctl type, 'L', 0x20 - 0x2F documented in ioctl-number.txt */
enum {
@@ -111,6 +117,9 @@ enum {
/* device level cmds */
NVM_DEV_CREATE_CMD,
NVM_DEV_REMOVE_CMD,
+
+ /* Init a device to support LightNVM media managers */
+ NVM_DEV_INIT_CMD,
};
#define NVM_IOCTL 'L' /* 0x4c */
@@ -123,6 +132,8 @@ enum {
struct nvm_ioctl_create)
#define NVM_DEV_REMOVE _IOW(NVM_IOCTL, NVM_DEV_REMOVE_CMD, \
struct nvm_ioctl_remove)
+#define NVM_DEV_INIT _IOW(NVM_IOCTL, NVM_DEV_INIT_CMD, \
+ struct nvm_ioctl_dev_init)
#define NVM_VERSION_MAJOR 1
#define NVM_VERSION_MINOR 0