diff options
author | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2011-02-01 16:13:29 -0500 |
---|---|---|
committer | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2011-11-04 15:52:53 -0400 |
commit | a53295b6998f62d961c29e54051c1cf1d738c2b3 (patch) | |
tree | 835a6f4ecbb8de47c232d7a1c5b4f76292d4dc24 /include/linux | |
parent | 7fc3cdabba75c2516b8b645eb0ca7907aea70415 (diff) |
NVMe: Add NVME_IOCTL_SUBMIT_IO
Allow userspace to submit synchronous I/O like the SCSI sg interface does.
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/nvme.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 1c0b5ef08959..0aaecb059d14 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
@@ -340,8 +340,26 @@ struct nvme_completion { | |||
340 | __le16 status; /* did the command fail, and if so, why? */ | 340 | __le16 status; /* did the command fail, and if so, why? */ |
341 | }; | 341 | }; |
342 | 342 | ||
343 | struct nvme_user_io { | ||
344 | __u8 opcode; | ||
345 | __u8 flags; | ||
346 | __u16 control; | ||
347 | __u32 nsid; | ||
348 | __u64 metadata; | ||
349 | __u64 addr; | ||
350 | __u64 slba; | ||
351 | __u16 nblocks; | ||
352 | __u16 block_shift; | ||
353 | __u32 dsmgmt; | ||
354 | __u32 reftag; | ||
355 | __u16 apptag; | ||
356 | __u16 appmask; | ||
357 | __u32 result; | ||
358 | }; | ||
359 | |||
343 | #define NVME_IOCTL_IDENTIFY_NS _IOW('N', 0x40, struct nvme_id_ns) | 360 | #define NVME_IOCTL_IDENTIFY_NS _IOW('N', 0x40, struct nvme_id_ns) |
344 | #define NVME_IOCTL_IDENTIFY_CTRL _IOW('N', 0x41, struct nvme_id_ctrl) | 361 | #define NVME_IOCTL_IDENTIFY_CTRL _IOW('N', 0x41, struct nvme_id_ctrl) |
345 | #define NVME_IOCTL_GET_RANGE_TYPE _IOW('N', 0x42, struct nvme_lba_range_type) | 362 | #define NVME_IOCTL_GET_RANGE_TYPE _IOW('N', 0x42, struct nvme_lba_range_type) |
363 | #define NVME_IOCTL_SUBMIT_IO _IOWR('N', 0x43, struct nvme_rw_command) | ||
346 | 364 | ||
347 | #endif /* _LINUX_NVME_H */ | 365 | #endif /* _LINUX_NVME_H */ |