diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-21 22:01:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-21 22:01:55 -0500 |
commit | 0a13daedf7ffc71b0c374a036355da7fddb20d6d (patch) | |
tree | af51c711e3e998613a8a4af686cdac0d8b754d98 /include/uapi | |
parent | 641203549a21ba6a701aecd05c3dfc969ec670cc (diff) | |
parent | a7fd9a4f3e8179bab31e4637236ebb0e0b7867c6 (diff) |
Merge branch 'for-4.5/lightnvm' of git://git.kernel.dk/linux-block
Pull lightnvm fixes and updates from Jens Axboe:
"This should have been part of the drivers branch, but it arrived a bit
late and wasn't based on the official core block driver branch. So
they got a small scolding, but got a pass since it's still new. Hence
it's in a separate branch.
This is mostly pure fixes, contained to lightnvm/, and minor feature
additions"
* 'for-4.5/lightnvm' of git://git.kernel.dk/linux-block: (26 commits)
lightnvm: ensure that nvm_dev_ops can be used without CONFIG_NVM
lightnvm: introduce factory reset
lightnvm: use system block for mm initialization
lightnvm: introduce ioctl to initialize device
lightnvm: core on-disk initialization
lightnvm: introduce mlc lower page table mappings
lightnvm: add mccap support
lightnvm: manage open and closed blocks separately
lightnvm: fix missing grown bad block type
lightnvm: reference rrpc lun in rrpc block
lightnvm: introduce nvm_submit_ppa
lightnvm: move rq->error to nvm_rq->error
lightnvm: support multiple ppas in nvm_erase_ppa
lightnvm: move the pages per block check out of the loop
lightnvm: sectors first in ppa list
lightnvm: fix locking and mempool in rrpc_lun_gc
lightnvm: put block back to gc list on its reclaim fail
lightnvm: check bi_error in gc
lightnvm: return the get_bb_tbl return value
lightnvm: refactor end_io functions for sync
...
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/lightnvm.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/uapi/linux/lightnvm.h b/include/uapi/linux/lightnvm.h index 928f98997d8a..774a43128a7a 100644 --- a/include/uapi/linux/lightnvm.h +++ b/include/uapi/linux/lightnvm.h | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #define NVM_TTYPE_NAME_MAX 48 | 34 | #define NVM_TTYPE_NAME_MAX 48 |
35 | #define NVM_TTYPE_MAX 63 | 35 | #define NVM_TTYPE_MAX 63 |
36 | #define NVM_MMTYPE_LEN 8 | ||
36 | 37 | ||
37 | #define NVM_CTRL_FILE "/dev/lightnvm/control" | 38 | #define NVM_CTRL_FILE "/dev/lightnvm/control" |
38 | 39 | ||
@@ -100,6 +101,26 @@ struct nvm_ioctl_remove { | |||
100 | __u32 flags; | 101 | __u32 flags; |
101 | }; | 102 | }; |
102 | 103 | ||
104 | struct nvm_ioctl_dev_init { | ||
105 | char dev[DISK_NAME_LEN]; /* open-channel SSD device */ | ||
106 | char mmtype[NVM_MMTYPE_LEN]; /* register to media manager */ | ||
107 | |||
108 | __u32 flags; | ||
109 | }; | ||
110 | |||
111 | enum { | ||
112 | NVM_FACTORY_ERASE_ONLY_USER = 1 << 0, /* erase only blocks used as | ||
113 | * host blks or grown blks */ | ||
114 | NVM_FACTORY_RESET_HOST_BLKS = 1 << 1, /* remove host blk marks */ | ||
115 | NVM_FACTORY_RESET_GRWN_BBLKS = 1 << 2, /* remove grown blk marks */ | ||
116 | NVM_FACTORY_NR_BITS = 1 << 3, /* stops here */ | ||
117 | }; | ||
118 | |||
119 | struct nvm_ioctl_dev_factory { | ||
120 | char dev[DISK_NAME_LEN]; | ||
121 | |||
122 | __u32 flags; | ||
123 | }; | ||
103 | 124 | ||
104 | /* The ioctl type, 'L', 0x20 - 0x2F documented in ioctl-number.txt */ | 125 | /* The ioctl type, 'L', 0x20 - 0x2F documented in ioctl-number.txt */ |
105 | enum { | 126 | enum { |
@@ -110,6 +131,12 @@ enum { | |||
110 | /* device level cmds */ | 131 | /* device level cmds */ |
111 | NVM_DEV_CREATE_CMD, | 132 | NVM_DEV_CREATE_CMD, |
112 | NVM_DEV_REMOVE_CMD, | 133 | NVM_DEV_REMOVE_CMD, |
134 | |||
135 | /* Init a device to support LightNVM media managers */ | ||
136 | NVM_DEV_INIT_CMD, | ||
137 | |||
138 | /* Factory reset device */ | ||
139 | NVM_DEV_FACTORY_CMD, | ||
113 | }; | 140 | }; |
114 | 141 | ||
115 | #define NVM_IOCTL 'L' /* 0x4c */ | 142 | #define NVM_IOCTL 'L' /* 0x4c */ |
@@ -122,6 +149,10 @@ enum { | |||
122 | struct nvm_ioctl_create) | 149 | struct nvm_ioctl_create) |
123 | #define NVM_DEV_REMOVE _IOW(NVM_IOCTL, NVM_DEV_REMOVE_CMD, \ | 150 | #define NVM_DEV_REMOVE _IOW(NVM_IOCTL, NVM_DEV_REMOVE_CMD, \ |
124 | struct nvm_ioctl_remove) | 151 | struct nvm_ioctl_remove) |
152 | #define NVM_DEV_INIT _IOW(NVM_IOCTL, NVM_DEV_INIT_CMD, \ | ||
153 | struct nvm_ioctl_dev_init) | ||
154 | #define NVM_DEV_FACTORY _IOW(NVM_IOCTL, NVM_DEV_FACTORY_CMD, \ | ||
155 | struct nvm_ioctl_dev_factory) | ||
125 | 156 | ||
126 | #define NVM_VERSION_MAJOR 1 | 157 | #define NVM_VERSION_MAJOR 1 |
127 | #define NVM_VERSION_MINOR 0 | 158 | #define NVM_VERSION_MINOR 0 |