aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 14:42:23 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 14:42:23 -0500
commitecc88efbe7adceb3f4bfdbbb1efb669efcaab124 (patch)
treed9288ef55a17de21ac41cf84ae696ee83a28e336 /include
parent70a3a06d01ed9ca887316a881813cdefb8a20170 (diff)
parent972b29c8f86093f44e1d781588bd5c5faae3d8e3 (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull scsi target updates from Nicholas Bellinger: "The highlights in this series include: - Improve sg_table lookup scalability in RAMDISK_MCP (martin) - Add device attribute to expose config name for INQUIRY model (tregaron) - Convert tcm_vhost to use lock-less list for cmd completion (asias) - Add tcm_vhost support for multiple target's per endpoint (asias) - Add tcm_vhost support for multiple queues per vhost (asias) - Add missing mapped_lun bounds checking during make_mappedlun setup in generic fabric configfs code (jan engelhardt + nab) - Enforce individual iscsi-target network portal export once per TargetName endpoint (grover + nab) - Add WRITE_SAME w/ UNMAP=0 emulation to FILEIO backend (nab) Things have been mostly quiet this round, with majority of the work being done on the iser-target WIP driver + associated iscsi-target refactoring patches currently in flight for v3.10 code. At this point there is one patch series left outstanding from Asias to add support for UNMAP + WRITE_SAME w/ UNMAP=1 to FILEIO awaiting feedback from hch & Co, that will likely be included in a post v3.9-rc1 PULL request if there are no objections. Also, there is a regression bug recently reported off-list that seems to be effecting v3.5 and v3.6 kernels with MSFT iSCSI initiators that is still being tracked down. No word if this effects >= v3.7 just yet, but if so there will likely another PULL request coming your way.." * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (26 commits) target: Rename spc_get_write_same_sectors -> sbc_get_write_same_sectors target/file: Add WRITE_SAME w/ UNMAP=0 emulation support iscsi-target: Enforce individual network portal export once per TargetName iscsi-target: Refactor iscsit_get_np sockaddr matching into iscsit_check_np_match target: Add missing mapped_lun bounds checking during make_mappedlun setup target: Fix lookup of dynamic NodeACLs during cached demo-mode operation target: Fix parameter list length checking in MODE SELECT target: Fix error checking for UNMAP commands target: Fix sense data for out-of-bounds IO operations target_core_rd: break out unterminated loop during copy tcm_vhost: Multi-queue support tcm_vhost: Multi-target support target: Add device attribute to expose config_item_name for INQUIRY model target: don't truncate the fail intr address target: don't always say "ipv6" as address type target/iblock: Use backend REQ_FLUSH hint for WriteCacheEnabled status iscsi-target: make some temporary buffers larger tcm_vhost: Optimize gup in vhost_scsi_map_to_sgl tcm_vhost: Use iov_num_pages to calculate sgl_count tcm_vhost: Introduce iov_num_pages ...
Diffstat (limited to 'include')
-rw-r--r--include/target/target_core_backend.h5
-rw-r--r--include/target/target_core_base.h7
2 files changed, 9 insertions, 3 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h
index 507910992c59..b128c20770bc 100644
--- a/include/target/target_core_backend.h
+++ b/include/target/target_core_backend.h
@@ -35,6 +35,7 @@ struct se_subsystem_api {
35 u32 (*get_device_type)(struct se_device *); 35 u32 (*get_device_type)(struct se_device *);
36 sector_t (*get_blocks)(struct se_device *); 36 sector_t (*get_blocks)(struct se_device *);
37 unsigned char *(*get_sense_buffer)(struct se_cmd *); 37 unsigned char *(*get_sense_buffer)(struct se_cmd *);
38 bool (*get_write_cache)(struct se_device *);
38}; 39};
39 40
40struct sbc_ops { 41struct sbc_ops {
@@ -52,11 +53,13 @@ void target_complete_cmd(struct se_cmd *, u8);
52 53
53sense_reason_t spc_parse_cdb(struct se_cmd *cmd, unsigned int *size); 54sense_reason_t spc_parse_cdb(struct se_cmd *cmd, unsigned int *size);
54sense_reason_t spc_emulate_report_luns(struct se_cmd *cmd); 55sense_reason_t spc_emulate_report_luns(struct se_cmd *cmd);
55sector_t spc_get_write_same_sectors(struct se_cmd *cmd); 56sense_reason_t spc_emulate_inquiry_std(struct se_cmd *, unsigned char *);
57sense_reason_t spc_emulate_evpd_83(struct se_cmd *, unsigned char *);
56 58
57sense_reason_t sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops); 59sense_reason_t sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops);
58u32 sbc_get_device_rev(struct se_device *dev); 60u32 sbc_get_device_rev(struct se_device *dev);
59u32 sbc_get_device_type(struct se_device *dev); 61u32 sbc_get_device_type(struct se_device *dev);
62sector_t sbc_get_write_same_sectors(struct se_cmd *cmd);
60 63
61void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); 64void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *);
62int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *); 65int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *);
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 663e34a5383f..c4af592f7057 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -44,7 +44,7 @@
44/* Used by core_alua_store_tg_pt_gp_info() and target_core_alua_tg_pt_gp_show_attr_members() */ 44/* Used by core_alua_store_tg_pt_gp_info() and target_core_alua_tg_pt_gp_show_attr_members() */
45#define TG_PT_GROUP_NAME_BUF 256 45#define TG_PT_GROUP_NAME_BUF 256
46/* Used to parse VPD into struct t10_vpd */ 46/* Used to parse VPD into struct t10_vpd */
47#define VPD_TMP_BUF_SIZE 128 47#define VPD_TMP_BUF_SIZE 254
48/* Used by transport_generic_cmd_sequencer() */ 48/* Used by transport_generic_cmd_sequencer() */
49#define READ_BLOCK_LEN 6 49#define READ_BLOCK_LEN 6
50#define READ_CAP_LEN 8 50#define READ_CAP_LEN 8
@@ -75,6 +75,8 @@
75#define DA_MAX_WRITE_SAME_LEN 0 75#define DA_MAX_WRITE_SAME_LEN 0
76/* Default max transfer length */ 76/* Default max transfer length */
77#define DA_FABRIC_MAX_SECTORS 8192 77#define DA_FABRIC_MAX_SECTORS 8192
78/* Use a model alias based on the configfs backend device name */
79#define DA_EMULATE_MODEL_ALIAS 0
78/* Emulation for Direct Page Out */ 80/* Emulation for Direct Page Out */
79#define DA_EMULATE_DPO 0 81#define DA_EMULATE_DPO 0
80/* Emulation for Forced Unit Access WRITEs */ 82/* Emulation for Forced Unit Access WRITEs */
@@ -193,6 +195,7 @@ enum tcm_sense_reason_table {
193 TCM_RESERVATION_CONFLICT = R(0x10), 195 TCM_RESERVATION_CONFLICT = R(0x10),
194 TCM_ADDRESS_OUT_OF_RANGE = R(0x11), 196 TCM_ADDRESS_OUT_OF_RANGE = R(0x11),
195 TCM_OUT_OF_RESOURCES = R(0x12), 197 TCM_OUT_OF_RESOURCES = R(0x12),
198 TCM_PARAMETER_LIST_LENGTH_ERROR = R(0x13),
196#undef R 199#undef R
197}; 200};
198 201
@@ -211,7 +214,6 @@ enum tcm_tmreq_table {
211 TMR_LUN_RESET = 5, 214 TMR_LUN_RESET = 5,
212 TMR_TARGET_WARM_RESET = 6, 215 TMR_TARGET_WARM_RESET = 6,
213 TMR_TARGET_COLD_RESET = 7, 216 TMR_TARGET_COLD_RESET = 7,
214 TMR_FABRIC_TMR = 255,
215}; 217};
216 218
217/* fabric independent task management response values */ 219/* fabric independent task management response values */
@@ -592,6 +594,7 @@ struct se_dev_entry {
592}; 594};
593 595
594struct se_dev_attrib { 596struct se_dev_attrib {
597 int emulate_model_alias;
595 int emulate_dpo; 598 int emulate_dpo;
596 int emulate_fua_write; 599 int emulate_fua_write;
597 int emulate_fua_read; 600 int emulate_fua_read;