aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_pr.c
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2012-04-03 18:51:12 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-04-14 20:40:35 -0400
commit8b1e1244db85d58f7c612870ec2c1afd9098ae93 (patch)
tree2f96b3c2df7fb323562dd094f022cbae357df62d /drivers/target/target_core_pr.c
parent6f3c0e69a9c20441bdc6d3b2d18b83b244384ec6 (diff)
target/iscsi: Misc cleanups from Agrover (round 2)
This patch includes the handful of squashed patches for target/iscsi from Andy's original series into lio-core/master code: *) Make iscsit_add_reject static *) Remove unused data_offset_end from iscsi_datain_req *) Remove "#if 0" stubs *) Rename iscsi_datain_req to cmd_datain_node *) Cleanups for built_r2ts_for_cmd() *) Cleanups for Cleanup build_sendtargets_response() Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_pr.c')
-rw-r--r--drivers/target/target_core_pr.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index 86f0c3b5d500..9754819b6042 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -500,11 +500,10 @@ static int core_scsi3_pr_seq_non_holder(
500 * statement. 500 * statement.
501 */ 501 */
502 if (!ret && !other_cdb) { 502 if (!ret && !other_cdb) {
503#if 0
504 pr_debug("Allowing explict CDB: 0x%02x for %s" 503 pr_debug("Allowing explict CDB: 0x%02x for %s"
505 " reservation holder\n", cdb[0], 504 " reservation holder\n", cdb[0],
506 core_scsi3_pr_dump_type(pr_reg_type)); 505 core_scsi3_pr_dump_type(pr_reg_type));
507#endif 506
508 return ret; 507 return ret;
509 } 508 }
510 /* 509 /*
@@ -532,14 +531,14 @@ static int core_scsi3_pr_seq_non_holder(
532 * as we expect registered non-reservation holding 531 * as we expect registered non-reservation holding
533 * nexuses to issue CDBs. 532 * nexuses to issue CDBs.
534 */ 533 */
535#if 0 534
536 if (!registered_nexus) { 535 if (!registered_nexus) {
537 pr_debug("Allowing implict CDB: 0x%02x" 536 pr_debug("Allowing implict CDB: 0x%02x"
538 " for %s reservation on unregistered" 537 " for %s reservation on unregistered"
539 " nexus\n", cdb[0], 538 " nexus\n", cdb[0],
540 core_scsi3_pr_dump_type(pr_reg_type)); 539 core_scsi3_pr_dump_type(pr_reg_type));
541 } 540 }
542#endif 541
543 return 0; 542 return 0;
544 } 543 }
545 } else if ((reg_only) || (all_reg)) { 544 } else if ((reg_only) || (all_reg)) {
@@ -548,11 +547,11 @@ static int core_scsi3_pr_seq_non_holder(
548 * For PR_*_REG_ONLY and PR_*_ALL_REG reservations, 547 * For PR_*_REG_ONLY and PR_*_ALL_REG reservations,
549 * allow commands from registered nexuses. 548 * allow commands from registered nexuses.
550 */ 549 */
551#if 0 550
552 pr_debug("Allowing implict CDB: 0x%02x for %s" 551 pr_debug("Allowing implict CDB: 0x%02x for %s"
553 " reservation\n", cdb[0], 552 " reservation\n", cdb[0],
554 core_scsi3_pr_dump_type(pr_reg_type)); 553 core_scsi3_pr_dump_type(pr_reg_type));
555#endif 554
556 return 0; 555 return 0;
557 } 556 }
558 } 557 }
@@ -1666,12 +1665,12 @@ static int core_scsi3_decode_spec_i_port(
1666 ret = -EINVAL; 1665 ret = -EINVAL;
1667 goto out; 1666 goto out;
1668 } 1667 }
1669#if 0 1668
1670 pr_debug("SPC-3 PR SPEC_I_PT: Got %s data_length: %u tpdl: %u" 1669 pr_debug("SPC-3 PR SPEC_I_PT: Got %s data_length: %u tpdl: %u"
1671 " tid_len: %d for %s + %s\n", 1670 " tid_len: %d for %s + %s\n",
1672 dest_tpg->se_tpg_tfo->get_fabric_name(), cmd->data_length, 1671 dest_tpg->se_tpg_tfo->get_fabric_name(), cmd->data_length,
1673 tpdl, tid_len, i_str, iport_ptr); 1672 tpdl, tid_len, i_str, iport_ptr);
1674#endif 1673
1675 if (tid_len > tpdl) { 1674 if (tid_len > tpdl) {
1676 pr_err("SPC-3 PR SPEC_I_PT: Illegal tid_len:" 1675 pr_err("SPC-3 PR SPEC_I_PT: Illegal tid_len:"
1677 " %u for Transport ID: %s\n", tid_len, ptr); 1676 " %u for Transport ID: %s\n", tid_len, ptr);
@@ -1714,12 +1713,12 @@ static int core_scsi3_decode_spec_i_port(
1714 ret = -EINVAL; 1713 ret = -EINVAL;
1715 goto out; 1714 goto out;
1716 } 1715 }
1717#if 0 1716
1718 pr_debug("SPC-3 PR SPEC_I_PT: Located %s Node: %s" 1717 pr_debug("SPC-3 PR SPEC_I_PT: Located %s Node: %s"
1719 " dest_se_deve mapped_lun: %u\n", 1718 " dest_se_deve mapped_lun: %u\n",
1720 dest_tpg->se_tpg_tfo->get_fabric_name(), 1719 dest_tpg->se_tpg_tfo->get_fabric_name(),
1721 dest_node_acl->initiatorname, dest_se_deve->mapped_lun); 1720 dest_node_acl->initiatorname, dest_se_deve->mapped_lun);
1722#endif 1721
1723 /* 1722 /*
1724 * Skip any TransportIDs that already have a registration for 1723 * Skip any TransportIDs that already have a registration for
1725 * this target port. 1724 * this target port.
@@ -3473,10 +3472,10 @@ static int core_scsi3_emulate_pro_register_and_move(
3473 3472
3474 buf = transport_kmap_data_sg(cmd); 3473 buf = transport_kmap_data_sg(cmd);
3475 proto_ident = (buf[24] & 0x0f); 3474 proto_ident = (buf[24] & 0x0f);
3476#if 0 3475
3477 pr_debug("SPC-3 PR REGISTER_AND_MOVE: Extracted Protocol Identifier:" 3476 pr_debug("SPC-3 PR REGISTER_AND_MOVE: Extracted Protocol Identifier:"
3478 " 0x%02x\n", proto_ident); 3477 " 0x%02x\n", proto_ident);
3479#endif 3478
3480 if (proto_ident != dest_tf_ops->get_fabric_proto_ident(dest_se_tpg)) { 3479 if (proto_ident != dest_tf_ops->get_fabric_proto_ident(dest_se_tpg)) {
3481 pr_err("SPC-3 PR REGISTER_AND_MOVE: Received" 3480 pr_err("SPC-3 PR REGISTER_AND_MOVE: Received"
3482 " proto_ident: 0x%02x does not match ident: 0x%02x" 3481 " proto_ident: 0x%02x does not match ident: 0x%02x"
@@ -3575,11 +3574,11 @@ after_iport_check:
3575 ret = -EINVAL; 3574 ret = -EINVAL;
3576 goto out; 3575 goto out;
3577 } 3576 }
3578#if 0 3577
3579 pr_debug("SPC-3 PR REGISTER_AND_MOVE: Found %s dest_node_acl:" 3578 pr_debug("SPC-3 PR REGISTER_AND_MOVE: Found %s dest_node_acl:"
3580 " %s from TransportID\n", dest_tf_ops->get_fabric_name(), 3579 " %s from TransportID\n", dest_tf_ops->get_fabric_name(),
3581 dest_node_acl->initiatorname); 3580 dest_node_acl->initiatorname);
3582#endif 3581
3583 /* 3582 /*
3584 * Locate the struct se_dev_entry pointer for the matching RELATIVE TARGET 3583 * Locate the struct se_dev_entry pointer for the matching RELATIVE TARGET
3585 * PORT IDENTIFIER. 3584 * PORT IDENTIFIER.
@@ -3603,12 +3602,12 @@ after_iport_check:
3603 ret = -EINVAL; 3602 ret = -EINVAL;
3604 goto out; 3603 goto out;
3605 } 3604 }
3606#if 0 3605
3607 pr_debug("SPC-3 PR REGISTER_AND_MOVE: Located %s node %s LUN" 3606 pr_debug("SPC-3 PR REGISTER_AND_MOVE: Located %s node %s LUN"
3608 " ACL for dest_se_deve->mapped_lun: %u\n", 3607 " ACL for dest_se_deve->mapped_lun: %u\n",
3609 dest_tf_ops->get_fabric_name(), dest_node_acl->initiatorname, 3608 dest_tf_ops->get_fabric_name(), dest_node_acl->initiatorname,
3610 dest_se_deve->mapped_lun); 3609 dest_se_deve->mapped_lun);
3611#endif 3610
3612 /* 3611 /*
3613 * A persistent reservation needs to already existing in order to 3612 * A persistent reservation needs to already existing in order to
3614 * successfully complete the REGISTER_AND_MOVE service action.. 3613 * successfully complete the REGISTER_AND_MOVE service action..