summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/nvme.h
diff options
context:
space:
mode:
authorJens Axboe2017-06-27 20:03:06 +0200
committerJens Axboe2017-06-27 20:05:56 +0200
commitf5d118406247acfc4fc481e441e01ea4d6318fdc (patch)
tree876a519c0799d1ce9d51d904f63ec2e2e27a36ce /drivers/nvme/host/nvme.h
parentbtrfs: add support for passing in write hints for buffered writes (diff)
downloadkernel-qcow2-linux-f5d118406247acfc4fc481e441e01ea4d6318fdc.tar.gz
kernel-qcow2-linux-f5d118406247acfc4fc481e441e01ea4d6318fdc.tar.xz
kernel-qcow2-linux-f5d118406247acfc4fc481e441e01ea4d6318fdc.zip
nvme: add support for streams and directives
This adds support for Directives in NVMe, particular for the Streams directive. Support for Directives is a new feature in NVMe 1.3. It allows a user to pass in information about where to store the data, so that it the device can do so most effiently. If an application is managing and writing data with different life times, mixing differently retentioned data onto the same locations on flash can cause write amplification to grow. This, in turn, will reduce performance and life time of the device. Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r--drivers/nvme/host/nvme.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index ec8c7363934d..f616835afc4c 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -147,6 +147,8 @@ struct nvme_ctrl {
u16 oncs;
u16 vid;
u16 oacs;
+ u16 nssa;
+ u16 nr_streams;
atomic_t abort_limit;
u8 event_limit;
u8 vwc;
@@ -199,6 +201,8 @@ struct nvme_ns {
unsigned ns_id;
int lba_shift;
u16 ms;
+ u16 sgs;
+ u32 sws;
bool ext;
u8 pi_type;
unsigned long flags;