History

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 ...

Linus Torvalds committed 10 years ago

Commit 0a13dae2 parents 6412035 a7fd9a410 files · +1476 −226Browse files

Showing the changes to include/uapi (1 of 10 files). Show all

Unified · Split

include/uapi/linux/lightnvm.h+31−0
@@ -33,6 +33,7 @@ · 32 unmodified lines
3333
3434 #define NVM_TTYPE_NAME_MAX 48
3535 #define NVM_TTYPE_MAX 63
36+#define NVM_MMTYPE_LEN 8
3637
3738 #define NVM_CTRL_FILE "/dev/lightnvm/control"
3839
@@ -100,6 +101,26 @@ struct nvm_ioctl_remove { · 61 unmodified lines
100101 __u32 flags;
101102 };
102103
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+};
103124
104125 /* The ioctl type, 'L', 0x20 - 0x2F documented in ioctl-number.txt */
105126 enum {
@@ -110,6 +131,12 @@ enum { · 4 unmodified lines
110131 /* device level cmds */
111132 NVM_DEV_CREATE_CMD,
112133 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,
113140 };
114141
115142 #define NVM_IOCTL 'L' /* 0x4c */
@@ -122,6 +149,10 @@ enum { · 6 unmodified lines
122149 struct nvm_ioctl_create)
123150 #define NVM_DEV_REMOVE _IOW(NVM_IOCTL, NVM_DEV_REMOVE_CMD, \
124151 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)
125156
126157 #define NVM_VERSION_MAJOR 1
127158 #define NVM_VERSION_MINOR 0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t