diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-15 17:25:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-15 17:25:10 -0500 |
commit | 5bd665f28db2b04a8d6fe277342479906fc60b62 (patch) | |
tree | 4f9f63120fed3a61b44bbb7ec4ebaaa4dc4fc571 /drivers/scsi | |
parent | 115b1cc2ef0f43ecb42bdbf55f06e9d2231d5a7e (diff) | |
parent | 79e62fc3827bd437c304c1810f36896fc1e717b1 (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull target updates from Nicholas Bellinger:
"It has been a very busy development cycle this time around in target
land, with the highlights including:
- Kill struct se_subsystem_dev, in favor of direct se_device usage
(hch)
- Simplify reservations code by combining SPC-3 + SCSI-2 support for
virtual backends only (hch)
- Simplify ALUA code for virtual only backends, and remove left over
abstractions (hch)
- Pass sense_reason_t as return value for I/O submission path (hch)
- Refactor MODE_SENSE emulation to allow for easier addition of new
mode pages. (roland)
- Add emulation of MODE_SELECT (roland)
- Fix bug in handling of ExpStatSN wrap-around (steve)
- Fix bug in TMR ABORT_TASK lookup in qla2xxx target (steve)
- Add WRITE_SAME w/ UNMAP=0 support for IBLOCK backends (nab)
- Convert ib_srpt to use modern target_submit_cmd caller + drop
legacy ioctx->kref usage (nab)
- Convert ib_srpt to use modern target_submit_tmr caller (nab)
- Add link_magic for fabric allow_link destination target_items for
symlinks within target_core_fabric_configfs.c code (nab)
- Allocate pointers in instead of full structs for
config_group->default_groups (sebastian)
- Fix 32-bit highmem breakage for FILEIO (sebastian)
All told, hch was able to shave off another ~1K LOC by killing the
se_subsystem_dev abstraction, along with a number of PR + ALUA
simplifications. Also, a nice patch by Roland is the refactoring of
MODE_SENSE handling, along with the addition of initial MODE_SELECT
emulation support for virtual backends.
Sebastian found a long-standing issue wrt to allocation of full
config_group instead of pointers for config_group->default_group[]
setup in a number of areas, which ends up saving memory with big
configurations. He also managed to fix another long-standing BUG wrt
to broken 32-bit highmem support within the FILEIO backend driver.
Thank you again to everyone who contributed this round!"
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (50 commits)
target/iscsi_target: Add NodeACL tags for initiator group support
target/tcm_fc: fix the lockdep warning due to inconsistent lock state
sbp-target: fix error path in sbp_make_tpg()
sbp-target: use simple assignment in tgt_agent_rw_agent_state()
iscsi-target: use kstrdup() for iscsi_param
target/file: merge fd_do_readv() and fd_do_writev()
target/file: Fix 32-bit highmem breakage for SGL -> iovec mapping
target: Add link_magic for fabric allow_link destination target_items
ib_srpt: Convert TMR path to target_submit_tmr
ib_srpt: Convert I/O path to target_submit_cmd + drop legacy ioctx->kref
target: Make spc_get_write_same_sectors return sector_t
target/configfs: use kmalloc() instead of kzalloc() for default groups
target/configfs: allocate only 6 slots for dev_cg->default_groups
target/configfs: allocate pointers instead of full struct for default_groups
target: update error handling for sbc_setup_write_same()
iscsit: use GFP_ATOMIC under spin lock
iscsi_target: Remove redundant null check before kfree
target/iblock: Forward declare bio helpers
target: Clean up flow in transport_check_aborted_status()
target: Clean up logic in transport_put_cmd()
...
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 21 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/tcm_qla2xxx.c | 4 |
2 files changed, 22 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index ad1dc14bacce..80f4b849e2b0 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c | |||
@@ -1264,8 +1264,27 @@ static int __qlt_24xx_handle_abts(struct scsi_qla_host *vha, | |||
1264 | struct abts_recv_from_24xx *abts, struct qla_tgt_sess *sess) | 1264 | struct abts_recv_from_24xx *abts, struct qla_tgt_sess *sess) |
1265 | { | 1265 | { |
1266 | struct qla_hw_data *ha = vha->hw; | 1266 | struct qla_hw_data *ha = vha->hw; |
1267 | struct se_session *se_sess = sess->se_sess; | ||
1267 | struct qla_tgt_mgmt_cmd *mcmd; | 1268 | struct qla_tgt_mgmt_cmd *mcmd; |
1269 | struct se_cmd *se_cmd; | ||
1270 | u32 lun = 0; | ||
1268 | int rc; | 1271 | int rc; |
1272 | bool found_lun = false; | ||
1273 | |||
1274 | spin_lock(&se_sess->sess_cmd_lock); | ||
1275 | list_for_each_entry(se_cmd, &se_sess->sess_cmd_list, se_cmd_list) { | ||
1276 | struct qla_tgt_cmd *cmd = | ||
1277 | container_of(se_cmd, struct qla_tgt_cmd, se_cmd); | ||
1278 | if (cmd->tag == abts->exchange_addr_to_abort) { | ||
1279 | lun = cmd->unpacked_lun; | ||
1280 | found_lun = true; | ||
1281 | break; | ||
1282 | } | ||
1283 | } | ||
1284 | spin_unlock(&se_sess->sess_cmd_lock); | ||
1285 | |||
1286 | if (!found_lun) | ||
1287 | return -ENOENT; | ||
1269 | 1288 | ||
1270 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00f, | 1289 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00f, |
1271 | "qla_target(%d): task abort (tag=%d)\n", | 1290 | "qla_target(%d): task abort (tag=%d)\n", |
@@ -1283,7 +1302,7 @@ static int __qlt_24xx_handle_abts(struct scsi_qla_host *vha, | |||
1283 | mcmd->sess = sess; | 1302 | mcmd->sess = sess; |
1284 | memcpy(&mcmd->orig_iocb.abts, abts, sizeof(mcmd->orig_iocb.abts)); | 1303 | memcpy(&mcmd->orig_iocb.abts, abts, sizeof(mcmd->orig_iocb.abts)); |
1285 | 1304 | ||
1286 | rc = ha->tgt.tgt_ops->handle_tmr(mcmd, 0, TMR_ABORT_TASK, | 1305 | rc = ha->tgt.tgt_ops->handle_tmr(mcmd, lun, TMR_ABORT_TASK, |
1287 | abts->exchange_addr_to_abort); | 1306 | abts->exchange_addr_to_abort); |
1288 | if (rc != 0) { | 1307 | if (rc != 0) { |
1289 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf052, | 1308 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf052, |
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 4372e32bc95f..d182c96e17ea 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c | |||
@@ -620,8 +620,8 @@ static void tcm_qla2xxx_handle_data_work(struct work_struct *work) | |||
620 | return; | 620 | return; |
621 | } | 621 | } |
622 | 622 | ||
623 | cmd->se_cmd.scsi_sense_reason = TCM_CHECK_CONDITION_ABORT_CMD; | 623 | transport_generic_request_failure(&cmd->se_cmd, |
624 | transport_generic_request_failure(&cmd->se_cmd); | 624 | TCM_CHECK_CONDITION_ABORT_CMD); |
625 | return; | 625 | return; |
626 | } | 626 | } |
627 | 627 | ||