[PATCH] target: Fix handling of small allocation lengths in REPORT LUNS

2015-08-13 Thread Spencer Baugh
truncate our response rather than return an error. Signed-off-by: Roland Dreier rol...@purestorage.com Signed-off-by: Spencer Baugh sba...@catern.com --- drivers/target/target_core_spc.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers

[PATCH v2] target: Fix handling of small allocation lengths in REPORT LUNS

2015-08-13 Thread Spencer Baugh
truncate our response rather than return an error. Signed-off-by: Roland Dreier rol...@purestorage.com Signed-off-by: Spencer Baugh sba...@catern.com --- drivers/target/target_core_spc.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers

[PATCH v2] target: remove initiatorname field in se_acl_lun

2015-08-13 Thread Spencer Baugh
-by: Spencer Baugh sba...@catern.com --- drivers/target/target_core_device.c | 8 +++- drivers/target/target_core_fabric_configfs.c | 2 +- include/target/target_core_base.h| 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/target/target_core_device.c

[PATCH v2] target: remove unused lun_flags field from se_lun

2015-08-13 Thread Spencer Baugh
From: Chris Zankel czan...@purestorage.com The lun_flags field is not used, so drop it. Signed-off-by: Chris Zankel czan...@purestorage.com Signed-off-by: Spencer Baugh sba...@catern.com --- include/target/target_core_base.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/target

Re: [PATCH v3] target: Drop iSCSI use of mutex around max_cmd_sn increment

2015-07-23 Thread Spencer Baugh
and there don't appear to be any other places that use max_cmd_sn within the mutex more than once, so this lock can't be providing any useful serialization. v2: Get correct values for logging v3: Fix whitespace damage Signed-off-by: Roland Dreier rol...@purestorage.com Signed-off-by: Spencer Baugh sba

[PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN

2015-07-23 Thread Spencer Baugh
of cdb in there as soon as possible. At a later point t_task_cdb is reset to the correct buffer, but until then traces and printks don't cause a crash. Signed-off-by: Alexei Potashnik ale...@purestorage.com Signed-off-by: Spencer Baugh sba...@catern.com --- drivers/target/iscsi/iscsi_target.c

Re: [PATCH] target: add support for START_STOP_UNIT SCSI opcode

2015-07-23 Thread Spencer Baugh
From: Brian Bunker br...@purestorage.com AIX servers using VIOS servers that virtualize FC cards will have a problem booting without support for START_STOP_UNIT. v2: Cite sb3r36 exactly, clean up if conditions Signed-off-by: Brian Bunker br...@purestorage.com Signed-off-by: Spencer Baugh sba

[PATCH v2] target: Drop iSCSI use of mutex around max_cmd_sn increment

2015-07-23 Thread Spencer Baugh
and there don't appear to be any other places that use max_cmd_sn within the mutex more than once, so this lock can't be providing any useful serialization. v2: Get correct values for logging Signed-off-by: Roland Dreier rol...@purestorage.com Signed-off-by: Spencer Baugh sba...@catern.com

[PATCH] target: allow underflow/overflow for PR OUT etc. commands

2015-07-22 Thread Spencer Baugh
these commands. The Windows compliance test sends them. Signed-off-by: Roland Dreier rol...@purestorage.com Signed-off-by: Spencer Baugh sba...@catern.com --- drivers/target/target_core_transport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/target

[PATCH] target: Drop iSCSI use of mutex around max_cmd_sn increment

2015-07-22 Thread Spencer Baugh
and there don't appear to be any other places that use max_cmd_sn within the mutex more than once, so this lock can't be providing any useful serialization. Signed-off-by: Roland Dreier rol...@purestorage.com Signed-off-by: Spencer Baugh sba...@catern.com --- drivers/target/iscsi/iscsi_target.c

[PATCH] qla2xxx: remove unused rval

2015-07-22 Thread Spencer Baugh
From: Joern Engel jo...@logfs.org We don't touch the return value of qla2x00_loop_resync in qla2x00_do_dpc, so don't bother collecting it. Fixes a compiler warning. Signed-off-by: Joern Engel jo...@logfs.org Signed-off-by: Spencer Baugh sba...@catern.com --- drivers/scsi/qla2xxx/qla_os.c | 3

[PATCH] target: improve unsupported opcode message

2015-07-22 Thread Spencer Baugh
...@purestorage.com Signed-off-by: Spencer Baugh sba...@catern.com --- drivers/target/target_core_spc.c | 3 --- drivers/target/target_core_transport.c | 5 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c index

Re: [PATCH 1/2] target: remove unused lun_flags field from se_lun

2015-07-21 Thread Spencer Baugh
Christoph Hellwig h...@infradead.org writes: Looks good, but what's up with your From lines: On Mon, Jul 20, 2015 at 04:29:49PM -0700, Spencer Baugh wrote: From: Spencer Baugh sba...@catern.com From: Chris Zankel czan...@purestorage.com plus another address for you in the actual email

[PATCH] target/iscsi: Fix double free of a TUR followed by a solicited NOPOUT

2015-07-21 Thread Spencer Baugh
-off-by: Alexei Potashnik ale...@purestorage.com Signed-off-by: Spencer Baugh sba...@catern.com --- drivers/target/iscsi/iscsi_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index a4cf58c

[PATCH] target: add support for START_STOP_UNIT SCSI opcode

2015-07-21 Thread Spencer Baugh
From: Brian Bunker br...@purestorage.com AIX servers using VIOS servers that virtualize FC cards will have a problem booting without support for START_STOP_UNIT. Signed-off-by: Brian Bunker br...@purestorage.com Signed-off-by: Spencer Baugh sba...@catern.com --- drivers/target/target_core_sbc.c

[PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN

2015-07-21 Thread Spencer Baugh
of cdb in there as soon as possible. At a later point t_task_cdb is reset to the correct buffer, but until then traces and printks don't cause a crash. Signed-off-by: Alexei Potashnik ale...@purestorage.com Signed-off-by: Spencer Baugh sba...@catern.com --- drivers/target/target_core_device.c

[PATCH] qla2xxx: Return the fabric command state for non-task management requests

2015-07-21 Thread Spencer Baugh
From: Dilip Kumar Uppugandla di...@purestorage.com Invoking get_cmd_state for qla2xxx always returns 0. Instead change it to return the actual fabric state from qla_tgt_cmd. This will help with debugging. Signed-off-by: Dilip Kumar Uppugandla di...@purestorage.com Signed-off-by: Spencer Baugh

[PATCH 1/2] target: remove unused lun_flags field from se_lun

2015-07-20 Thread Spencer Baugh
From: Spencer Baugh sba...@catern.com From: Chris Zankel czan...@purestorage.com The lun_flags field is not used, so drop it. Signed-off-by: Chris Zankel czan...@purestorage.com --- include/target/target_core_base.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/target

[PATCH 2/2] target: remove initiatorname field in se_acl_lun

2015-07-20 Thread Spencer Baugh
From: Spencer Baugh sba...@catern.com From: Chris Zankel czan...@purestorage.com The initiatorname field in se_acl_lun is only a copy of the same field in se_node_acl, so remove it and use the version in se_node_acl where needed (it's actually only used for pr_debug) Signed-off-by: Chris Zankel

[PATCH] target/iscsi: fix digest computation for chained SGs

2015-07-20 Thread Spencer Baugh
From: Alexei Potashnik ale...@purestorage.com Current implementation assumes that all the buffers of an IO are linked with a single SG list. Which makes it fail if SG chaining is used. Signed-off-by: Alexei Potashnik ale...@purestorage.com --- drivers/target/iscsi/iscsi_target.c | 9 -