aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/target/target_core_device.c46
-rw-r--r--drivers/target/target_core_file.c1
-rw-r--r--drivers/target/target_core_iblock.c1
-rw-r--r--drivers/target/target_core_rd.c1
-rw-r--r--drivers/target/target_core_user.c1
-rw-r--r--include/target/target_core_backend.h1
-rw-r--r--include/target/target_core_backend_configfs.h2
-rw-r--r--include/target/target_core_base.h3
8 files changed, 0 insertions, 56 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index ee4b89fb8841..58f49ff69b14 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -1103,51 +1103,6 @@ int se_dev_set_queue_depth(struct se_device *dev, u32 queue_depth)
1103} 1103}
1104EXPORT_SYMBOL(se_dev_set_queue_depth); 1104EXPORT_SYMBOL(se_dev_set_queue_depth);
1105 1105
1106int se_dev_set_fabric_max_sectors(struct se_device *dev, u32 fabric_max_sectors)
1107{
1108 int block_size = dev->dev_attrib.block_size;
1109
1110 if (dev->export_count) {
1111 pr_err("dev[%p]: Unable to change SE Device"
1112 " fabric_max_sectors while export_count is %d\n",
1113 dev, dev->export_count);
1114 return -EINVAL;
1115 }
1116 if (!fabric_max_sectors) {
1117 pr_err("dev[%p]: Illegal ZERO value for"
1118 " fabric_max_sectors\n", dev);
1119 return -EINVAL;
1120 }
1121 if (fabric_max_sectors < DA_STATUS_MAX_SECTORS_MIN) {
1122 pr_err("dev[%p]: Passed fabric_max_sectors: %u less than"
1123 " DA_STATUS_MAX_SECTORS_MIN: %u\n", dev, fabric_max_sectors,
1124 DA_STATUS_MAX_SECTORS_MIN);
1125 return -EINVAL;
1126 }
1127 if (fabric_max_sectors > DA_STATUS_MAX_SECTORS_MAX) {
1128 pr_err("dev[%p]: Passed fabric_max_sectors: %u"
1129 " greater than DA_STATUS_MAX_SECTORS_MAX:"
1130 " %u\n", dev, fabric_max_sectors,
1131 DA_STATUS_MAX_SECTORS_MAX);
1132 return -EINVAL;
1133 }
1134 /*
1135 * Align max_sectors down to PAGE_SIZE to follow transport_allocate_data_tasks()
1136 */
1137 if (!block_size) {
1138 block_size = 512;
1139 pr_warn("Defaulting to 512 for zero block_size\n");
1140 }
1141 fabric_max_sectors = se_dev_align_max_sectors(fabric_max_sectors,
1142 block_size);
1143
1144 dev->dev_attrib.fabric_max_sectors = fabric_max_sectors;
1145 pr_debug("dev[%p]: SE Device max_sectors changed to %u\n",
1146 dev, fabric_max_sectors);
1147 return 0;
1148}
1149EXPORT_SYMBOL(se_dev_set_fabric_max_sectors);
1150
1151int se_dev_set_optimal_sectors(struct se_device *dev, u32 optimal_sectors) 1106int se_dev_set_optimal_sectors(struct se_device *dev, u32 optimal_sectors)
1152{ 1107{
1153 if (dev->export_count) { 1108 if (dev->export_count) {
@@ -1553,7 +1508,6 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name)
1553 dev->dev_attrib.unmap_granularity_alignment = 1508 dev->dev_attrib.unmap_granularity_alignment =
1554 DA_UNMAP_GRANULARITY_ALIGNMENT_DEFAULT; 1509 DA_UNMAP_GRANULARITY_ALIGNMENT_DEFAULT;
1555 dev->dev_attrib.max_write_same_len = DA_MAX_WRITE_SAME_LEN; 1510 dev->dev_attrib.max_write_same_len = DA_MAX_WRITE_SAME_LEN;
1556 dev->dev_attrib.fabric_max_sectors = DA_FABRIC_MAX_SECTORS;
1557 1511
1558 xcopy_lun = &dev->xcopy_lun; 1512 xcopy_lun = &dev->xcopy_lun;
1559 xcopy_lun->lun_se_dev = dev; 1513 xcopy_lun->lun_se_dev = dev;
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
index b09021135c3b..d836de200a03 100644
--- a/drivers/target/target_core_file.c
+++ b/drivers/target/target_core_file.c
@@ -968,7 +968,6 @@ static struct configfs_attribute *fileio_backend_dev_attrs[] = {
968 &fileio_dev_attrib_hw_block_size.attr, 968 &fileio_dev_attrib_hw_block_size.attr,
969 &fileio_dev_attrib_block_size.attr, 969 &fileio_dev_attrib_block_size.attr,
970 &fileio_dev_attrib_hw_max_sectors.attr, 970 &fileio_dev_attrib_hw_max_sectors.attr,
971 &fileio_dev_attrib_fabric_max_sectors.attr,
972 &fileio_dev_attrib_optimal_sectors.attr, 971 &fileio_dev_attrib_optimal_sectors.attr,
973 &fileio_dev_attrib_hw_queue_depth.attr, 972 &fileio_dev_attrib_hw_queue_depth.attr,
974 &fileio_dev_attrib_queue_depth.attr, 973 &fileio_dev_attrib_queue_depth.attr,
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index 5795cd8ab5d9..78346b850968 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -883,7 +883,6 @@ static struct configfs_attribute *iblock_backend_dev_attrs[] = {
883 &iblock_dev_attrib_hw_block_size.attr, 883 &iblock_dev_attrib_hw_block_size.attr,
884 &iblock_dev_attrib_block_size.attr, 884 &iblock_dev_attrib_block_size.attr,
885 &iblock_dev_attrib_hw_max_sectors.attr, 885 &iblock_dev_attrib_hw_max_sectors.attr,
886 &iblock_dev_attrib_fabric_max_sectors.attr,
887 &iblock_dev_attrib_optimal_sectors.attr, 886 &iblock_dev_attrib_optimal_sectors.attr,
888 &iblock_dev_attrib_hw_queue_depth.attr, 887 &iblock_dev_attrib_hw_queue_depth.attr,
889 &iblock_dev_attrib_queue_depth.attr, 888 &iblock_dev_attrib_queue_depth.attr,
diff --git a/drivers/target/target_core_rd.c b/drivers/target/target_core_rd.c
index 60ebd170a561..98e83ac5661b 100644
--- a/drivers/target/target_core_rd.c
+++ b/drivers/target/target_core_rd.c
@@ -657,7 +657,6 @@ static struct configfs_attribute *rd_mcp_backend_dev_attrs[] = {
657 &rd_mcp_dev_attrib_hw_block_size.attr, 657 &rd_mcp_dev_attrib_hw_block_size.attr,
658 &rd_mcp_dev_attrib_block_size.attr, 658 &rd_mcp_dev_attrib_block_size.attr,
659 &rd_mcp_dev_attrib_hw_max_sectors.attr, 659 &rd_mcp_dev_attrib_hw_max_sectors.attr,
660 &rd_mcp_dev_attrib_fabric_max_sectors.attr,
661 &rd_mcp_dev_attrib_optimal_sectors.attr, 660 &rd_mcp_dev_attrib_optimal_sectors.attr,
662 &rd_mcp_dev_attrib_hw_queue_depth.attr, 661 &rd_mcp_dev_attrib_hw_queue_depth.attr,
663 &rd_mcp_dev_attrib_queue_depth.attr, 662 &rd_mcp_dev_attrib_queue_depth.attr,
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index 8bfa61c9693d..1157b559683b 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -1118,7 +1118,6 @@ static struct configfs_attribute *tcmu_backend_dev_attrs[] = {
1118 &tcmu_dev_attrib_hw_block_size.attr, 1118 &tcmu_dev_attrib_hw_block_size.attr,
1119 &tcmu_dev_attrib_block_size.attr, 1119 &tcmu_dev_attrib_block_size.attr,
1120 &tcmu_dev_attrib_hw_max_sectors.attr, 1120 &tcmu_dev_attrib_hw_max_sectors.attr,
1121 &tcmu_dev_attrib_fabric_max_sectors.attr,
1122 &tcmu_dev_attrib_optimal_sectors.attr, 1121 &tcmu_dev_attrib_optimal_sectors.attr,
1123 &tcmu_dev_attrib_hw_queue_depth.attr, 1122 &tcmu_dev_attrib_hw_queue_depth.attr,
1124 &tcmu_dev_attrib_queue_depth.attr, 1123 &tcmu_dev_attrib_queue_depth.attr,
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h
index 430cfaf92285..db81c65b8f48 100644
--- a/include/target/target_core_backend.h
+++ b/include/target/target_core_backend.h
@@ -135,7 +135,6 @@ int se_dev_set_is_nonrot(struct se_device *, int);
135int se_dev_set_emulate_rest_reord(struct se_device *dev, int); 135int se_dev_set_emulate_rest_reord(struct se_device *dev, int);
136int se_dev_set_queue_depth(struct se_device *, u32); 136int se_dev_set_queue_depth(struct se_device *, u32);
137int se_dev_set_max_sectors(struct se_device *, u32); 137int se_dev_set_max_sectors(struct se_device *, u32);
138int se_dev_set_fabric_max_sectors(struct se_device *, u32);
139int se_dev_set_optimal_sectors(struct se_device *, u32); 138int se_dev_set_optimal_sectors(struct se_device *, u32);
140int se_dev_set_block_size(struct se_device *, u32); 139int se_dev_set_block_size(struct se_device *, u32);
141 140
diff --git a/include/target/target_core_backend_configfs.h b/include/target/target_core_backend_configfs.h
index 3247d7530107..186f7a923570 100644
--- a/include/target/target_core_backend_configfs.h
+++ b/include/target/target_core_backend_configfs.h
@@ -98,8 +98,6 @@ static struct target_backend_dev_attrib_attribute _backend##_dev_attrib_##_name
98 TB_DEV_ATTR(_backend, block_size, S_IRUGO | S_IWUSR); \ 98 TB_DEV_ATTR(_backend, block_size, S_IRUGO | S_IWUSR); \
99 DEF_TB_DEV_ATTRIB_RO(_backend, hw_max_sectors); \ 99 DEF_TB_DEV_ATTRIB_RO(_backend, hw_max_sectors); \
100 TB_DEV_ATTR_RO(_backend, hw_max_sectors); \ 100 TB_DEV_ATTR_RO(_backend, hw_max_sectors); \
101 DEF_TB_DEV_ATTRIB(_backend, fabric_max_sectors); \
102 TB_DEV_ATTR(_backend, fabric_max_sectors, S_IRUGO | S_IWUSR); \
103 DEF_TB_DEV_ATTRIB(_backend, optimal_sectors); \ 101 DEF_TB_DEV_ATTRIB(_backend, optimal_sectors); \
104 TB_DEV_ATTR(_backend, optimal_sectors, S_IRUGO | S_IWUSR); \ 102 TB_DEV_ATTR(_backend, optimal_sectors, S_IRUGO | S_IWUSR); \
105 DEF_TB_DEV_ATTRIB_RO(_backend, hw_queue_depth); \ 103 DEF_TB_DEV_ATTRIB_RO(_backend, hw_queue_depth); \
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 397fb635766a..4a8795a87b9e 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -77,8 +77,6 @@
77#define DA_UNMAP_GRANULARITY_ALIGNMENT_DEFAULT 0 77#define DA_UNMAP_GRANULARITY_ALIGNMENT_DEFAULT 0
78/* Default max_write_same_len, disabled by default */ 78/* Default max_write_same_len, disabled by default */
79#define DA_MAX_WRITE_SAME_LEN 0 79#define DA_MAX_WRITE_SAME_LEN 0
80/* Default max transfer length */
81#define DA_FABRIC_MAX_SECTORS 8192
82/* Use a model alias based on the configfs backend device name */ 80/* Use a model alias based on the configfs backend device name */
83#define DA_EMULATE_MODEL_ALIAS 0 81#define DA_EMULATE_MODEL_ALIAS 0
84/* Emulation for Direct Page Out */ 82/* Emulation for Direct Page Out */
@@ -694,7 +692,6 @@ struct se_dev_attrib {
694 u32 hw_block_size; 692 u32 hw_block_size;
695 u32 block_size; 693 u32 block_size;
696 u32 hw_max_sectors; 694 u32 hw_max_sectors;
697 u32 fabric_max_sectors;
698 u32 optimal_sectors; 695 u32 optimal_sectors;
699 u32 hw_queue_depth; 696 u32 hw_queue_depth;
700 u32 queue_depth; 697 u32 queue_depth;