You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
target: Add SCF_SCSI_TMR_CDB usage and drop se_tmr_req_cache
Change the test for if a cmd is a tmr request to checking if SCF_SCSI_TMR_CDB (a new flag) is set in cmd->se_cmd_flags. Also remove se_tmr_req_cache usage in favor of kzalloc usage, and make core_tmr_alloc_req() return int + setup se_cmd->se_tmr_req directly and fix up various fabric module usages Cc: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
committed by
Nicholas Bellinger
parent
35b2cdc4fe
commit
c8e31f26fe
@@ -169,7 +169,8 @@ enum se_cmd_flags_table {
|
||||
SCF_EMULATED_TASK_SENSE = 0x00000004,
|
||||
SCF_SCSI_DATA_SG_IO_CDB = 0x00000008,
|
||||
SCF_SCSI_CONTROL_SG_IO_CDB = 0x00000010,
|
||||
SCF_SCSI_NON_DATA_CDB = 0x00000040,
|
||||
SCF_SCSI_NON_DATA_CDB = 0x00000020,
|
||||
SCF_SCSI_TMR_CDB = 0x00000040,
|
||||
SCF_SCSI_CDB_EXCEPTION = 0x00000080,
|
||||
SCF_SCSI_RESERVATION_CONFLICT = 0x00000100,
|
||||
SCF_FUA = 0x00000200,
|
||||
@@ -498,6 +499,24 @@ struct se_task {
|
||||
struct completion task_stop_comp;
|
||||
};
|
||||
|
||||
struct se_tmr_req {
|
||||
/* Task Management function to be performed */
|
||||
u8 function;
|
||||
/* Task Management response to send */
|
||||
u8 response;
|
||||
int call_transport;
|
||||
/* Reference to ITT that Task Mgmt should be performed */
|
||||
u32 ref_task_tag;
|
||||
/* 64-bit encoded SAM LUN from $FABRIC_MOD TMR header */
|
||||
u64 ref_task_lun;
|
||||
void *fabric_tmr_ptr;
|
||||
struct se_cmd *task_cmd;
|
||||
struct se_cmd *ref_cmd;
|
||||
struct se_device *tmr_dev;
|
||||
struct se_lun *tmr_lun;
|
||||
struct list_head tmr_list;
|
||||
};
|
||||
|
||||
struct se_cmd {
|
||||
/* SAM response code being sent to initiator */
|
||||
u8 scsi_status;
|
||||
@@ -586,24 +605,6 @@ struct se_cmd {
|
||||
|
||||
};
|
||||
|
||||
struct se_tmr_req {
|
||||
/* Task Management function to be performed */
|
||||
u8 function;
|
||||
/* Task Management response to send */
|
||||
u8 response;
|
||||
int call_transport;
|
||||
/* Reference to ITT that Task Mgmt should be performed */
|
||||
u32 ref_task_tag;
|
||||
/* 64-bit encoded SAM LUN from $FABRIC_MOD TMR header */
|
||||
u64 ref_task_lun;
|
||||
void *fabric_tmr_ptr;
|
||||
struct se_cmd *task_cmd;
|
||||
struct se_cmd *ref_cmd;
|
||||
struct se_device *tmr_dev;
|
||||
struct se_lun *tmr_lun;
|
||||
struct list_head tmr_list;
|
||||
};
|
||||
|
||||
struct se_ua {
|
||||
u8 ua_asc;
|
||||
u8 ua_ascq;
|
||||
|
||||
@@ -139,7 +139,7 @@ void target_wait_for_sess_cmds(struct se_session *, int);
|
||||
|
||||
int core_alua_check_nonop_delay(struct se_cmd *);
|
||||
|
||||
struct se_tmr_req *core_tmr_alloc_req(struct se_cmd *, void *, u8, gfp_t);
|
||||
int core_tmr_alloc_req(struct se_cmd *, void *, u8, gfp_t);
|
||||
void core_tmr_release_req(struct se_tmr_req *);
|
||||
int transport_generic_handle_tmr(struct se_cmd *);
|
||||
int transport_lookup_tmr_lun(struct se_cmd *, u32);
|
||||
|
||||
Reference in New Issue
Block a user