Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292818
b: refs/heads/master
c: 4f26998
h: refs/heads/master
v: v3
  • Loading branch information
Andy Grover authored and Nicholas Bellinger committed Feb 25, 2012
1 parent ec8cee3 commit d05ca60
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef28640497f5935bf614e1e29b16972d8b97cdb2
refs/heads/master: 4f26998a79b30a5c912cfa1a759fa0c3e6f6414e
8 changes: 4 additions & 4 deletions trunk/drivers/target/iscsi/iscsi_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -1006,8 +1006,8 @@ static int iscsit_handle_scsi_cmd(
/*
* The CDB is going to an se_device_t.
*/
ret = iscsit_get_lun_for_cmd(cmd, hdr->cdb,
get_unaligned_le64(&hdr->lun));
ret = transport_lookup_cmd_lun(&cmd->se_cmd,
scsilun_to_int(&hdr->lun));
if (ret < 0) {
if (cmd->se_cmd.scsi_sense_reason == TCM_NON_EXISTENT_LUN) {
pr_debug("Responding to non-acl'ed,"
Expand Down Expand Up @@ -1746,8 +1746,8 @@ static int iscsit_handle_task_mgt_cmd(
* Locate the struct se_lun for all TMRs not related to ERL=2 TASK_REASSIGN
*/
if (function != ISCSI_TM_FUNC_TASK_REASSIGN) {
ret = iscsit_get_lun_for_tmr(cmd,
get_unaligned_le64(&hdr->lun));
ret = transport_lookup_tmr_lun(&cmd->se_cmd,
scsilun_to_int(&hdr->lun));
if (ret < 0) {
cmd->se_cmd.se_cmd_flags |= SCF_SCSI_CDB_EXCEPTION;
se_tmr->response = ISCSI_TMF_RSP_NO_LUN;
Expand Down
19 changes: 0 additions & 19 deletions trunk/drivers/target/iscsi/iscsi_target_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,6 @@
#include "iscsi_target_tpg.h"
#include "iscsi_target_util.h"

int iscsit_get_lun_for_tmr(
struct iscsi_cmd *cmd,
u64 lun)
{
u32 unpacked_lun = scsilun_to_int((struct scsi_lun *)&lun);

return transport_lookup_tmr_lun(&cmd->se_cmd, unpacked_lun);
}

int iscsit_get_lun_for_cmd(
struct iscsi_cmd *cmd,
unsigned char *cdb,
u64 lun)
{
u32 unpacked_lun = scsilun_to_int((struct scsi_lun *)&lun);

return transport_lookup_cmd_lun(&cmd->se_cmd, unpacked_lun);
}

void iscsit_determine_maxcmdsn(struct iscsi_session *sess)
{
struct se_node_acl *se_nacl;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/target/iscsi/iscsi_target_device.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef ISCSI_TARGET_DEVICE_H
#define ISCSI_TARGET_DEVICE_H

extern int iscsit_get_lun_for_tmr(struct iscsi_cmd *, u64);
extern int iscsit_get_lun_for_cmd(struct iscsi_cmd *, unsigned char *, u64);
extern void iscsit_determine_maxcmdsn(struct iscsi_session *);
extern void iscsit_increment_maxcmdsn(struct iscsi_cmd *, struct iscsi_session *);

Expand Down

0 comments on commit d05ca60

Please sign in to comment.