1 Oct 2011 14:55
[PATCH] tcm_qla2xxx: Wait for LUN_RESET aborted WRITEs to post via CTIO interrupt
Nicholas A. Bellinger <nab <at> linux-iscsi.org>
2011-10-01 12:55:42 GMT
2011-10-01 12:55:42 GMT
From: Nicholas Bellinger <nab <at> linux-iscsi.org> This patch addresses a bug where LUN_RESET aborted WRITEs could be released before a CTIO interrupt was able to post from hardware to acknowledge the aborted descriptor on the fabric. The fix adds a check in tcm_qla2xxx_write_pending_status for TRANSPORT_WRITE_PENDING status to wait for completion timeout in processing thread context while LUN_RESET is performed, and adds the inverse check within tcm_qla2xxx_handle_data() to determine when to finish completion when qla_tgt_cmd->write_data_transferred == 0 and se_cmd->t_transport_aborted != 0 once the CTIO interrupt has been triggered. This was first noticed with the following OOPs on .32 backports for the following descriptor: cmd: ffff88016709c300 [ 609.414494] LUN_RESET: cmd: ffff88016709c300 task: ffff8801dea81b60 ITT/CmdSN: 0x00116e20/0x00000000, i_state: 0, t_state/def_t_state: 3/0 cdb: 0x2a [ 609.414497] LUN_RESET: ITT[0x00116e20] - pr_res_key: 0x0000000000000000 t_task_cdbs: 8 t_task_cdbs_left: 8 t_task_cdbs_sent: 0 -- t_transport_active: 0 t_transport_stop: 0 t_transport_sent: 0 [ 609.414500] LUN_RESET: Got t_transport_active = 0 for task: ffff8801dea81b60, t_fe_count: 1 dev: ffff8801d33b66c0 [ 609.670008] LUN_RESET: from Device Queue: cmd: ffff8801df199c40 t_state: 9 t_fe_count: 0 [ 609.670017] LUN_RESET: from Device Queue: cmd: ffff8801df199440 t_state: 9 t_fe_count: 0 [ 609.670021] LUN_RESET: from Device Queue: cmd: ffff8801df199840 t_state: 9 t_fe_count: 0 [ 609.670025] LUN_RESET: from Device Queue: cmd: ffff8801df19a040 t_state: 9 t_fe_count: 0 [ 609.670030] LUN_RESET: TMR for [iblock] Complete [ 609.670032] queue_tm_rsp: mcmd: ffff8801df199000 func: 0x05 response: 0x00 [ 609.676015] ------------[ cut here ]------------ [ 609.676017] kernel BUG at /usr/src/lio-core-backport.git/kernel/drivers/scsi/qla2xxx/qla_target.c:2818! [ 609.676019] invalid opcode: 0000 [#1] SMP(Continue reading)
RSS Feed