aboutsummaryrefslogtreecommitdiffstats
path: root/include/target
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2011-07-05 16:34:52 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2011-07-22 05:37:47 -0400
commite22a7f075226c51f3f71b922e9eeb4f99fac1475 (patch)
treee0a04f974153136eafe13793ee59be58c37c5ffc /include/target
parentb2eb705e00a9b9a9b3122192a7ab3e9058f0c48a (diff)
target: Implement Block Device Characteristics VPD page
Implement page B1h, Block Device Characteristics, so that we can report a medium rotation rate of 1 (non-rotating / solid state) if the is_nonrot device attribute is set; we update the iblock backend to set this attribute if the underlying Linux block device has its nonrot flag set. Signed-off-by: Roland Dreier <roland@purestorage.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_base.h1
-rw-r--r--include/target/target_core_device.h1
-rw-r--r--include/target/target_core_transport.h2
3 files changed, 4 insertions, 0 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index cd163dd94cd4..81deb399bf6a 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -661,6 +661,7 @@ struct se_dev_attrib {
661 int emulate_reservations; 661 int emulate_reservations;
662 int emulate_alua; 662 int emulate_alua;
663 int enforce_pr_isids; 663 int enforce_pr_isids;
664 int is_nonrot;
664 u32 hw_block_size; 665 u32 hw_block_size;
665 u32 block_size; 666 u32 block_size;
666 u32 hw_max_sectors; 667 u32 hw_max_sectors;
diff --git a/include/target/target_core_device.h b/include/target/target_core_device.h
index 96586cc94984..f3b6ae655454 100644
--- a/include/target/target_core_device.h
+++ b/include/target/target_core_device.h
@@ -39,6 +39,7 @@ extern int se_dev_set_emulate_tas(struct se_device *, int);
39extern int se_dev_set_emulate_tpu(struct se_device *, int); 39extern int se_dev_set_emulate_tpu(struct se_device *, int);
40extern int se_dev_set_emulate_tpws(struct se_device *, int); 40extern int se_dev_set_emulate_tpws(struct se_device *, int);
41extern int se_dev_set_enforce_pr_isids(struct se_device *, int); 41extern int se_dev_set_enforce_pr_isids(struct se_device *, int);
42extern int se_dev_set_is_nonrot(struct se_device *, int);
42extern int se_dev_set_queue_depth(struct se_device *, u32); 43extern int se_dev_set_queue_depth(struct se_device *, u32);
43extern int se_dev_set_max_sectors(struct se_device *, u32); 44extern int se_dev_set_max_sectors(struct se_device *, u32);
44extern int se_dev_set_optimal_sectors(struct se_device *, u32); 45extern int se_dev_set_optimal_sectors(struct se_device *, u32);
diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h
index 2aae76412377..b27ce1af698b 100644
--- a/include/target/target_core_transport.h
+++ b/include/target/target_core_transport.h
@@ -101,6 +101,8 @@
101#define DA_ENFORCE_PR_ISIDS 1 101#define DA_ENFORCE_PR_ISIDS 1
102#define DA_STATUS_MAX_SECTORS_MIN 16 102#define DA_STATUS_MAX_SECTORS_MIN 16
103#define DA_STATUS_MAX_SECTORS_MAX 8192 103#define DA_STATUS_MAX_SECTORS_MAX 8192
104/* By default don't report non-rotating (solid state) medium */
105#define DA_IS_NONROT 0
104 106
105#define SE_MODE_PAGE_BUF 512 107#define SE_MODE_PAGE_BUF 512
106 108