target: Move task tag into struct se_cmd + support 64-bit tags
Simplify target core and target drivers by storing the task tag a.k.a. command identifier inside struct se_cmd. For several transports (e.g. SRP) tags are 64 bits wide. Hence add support for 64-bit tags. (Fix core_tmr_abort_task conversion spec warnings - nab) (Fix up usb-gadget to use 16-bit tags - HCH + bart) Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Andy Grover <agrover@redhat.com> Cc: Sagi Grimberg <sagig@mellanox.com> Cc: <qla2xxx-upstream@qlogic.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Juergen Gross <jgross@suse.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:

committed by
Nicholas Bellinger

parent
2650d71e24
commit
649ee05499
@@ -247,15 +247,6 @@ int ft_write_pending(struct se_cmd *se_cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 ft_get_task_tag(struct se_cmd *se_cmd)
|
||||
{
|
||||
struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd);
|
||||
|
||||
if (cmd->aborted)
|
||||
return ~0;
|
||||
return fc_seq_exch(cmd->seq)->rxid;
|
||||
}
|
||||
|
||||
int ft_get_cmd_state(struct se_cmd *se_cmd)
|
||||
{
|
||||
return 0;
|
||||
@@ -568,6 +559,7 @@ static void ft_send_work(struct work_struct *work)
|
||||
}
|
||||
|
||||
fc_seq_exch(cmd->seq)->lp->tt.seq_set_resp(cmd->seq, ft_recv_seq, cmd);
|
||||
cmd->se_cmd.tag = fc_seq_exch(cmd->seq)->rxid;
|
||||
/*
|
||||
* Use a single se_cmd->cmd_kref as we expect to release se_cmd
|
||||
* directly from ft_check_stop_free callback in response path.
|
||||
|
Reference in New Issue
Block a user