target: More core cleanups from AGrover (round 2)
This patch contains the squashed version of second round of target core cleanups and simplifications and Andy and Co. It also contains a handful of fixes to address bugs the original series and other minor cleanups. Here is the condensed shortlog: target: Remove unneeded casts to void* target: Rename get_lun_for_{cmd,tmr} to lookup_{cmd,tmr}_lun target: Make t_task a member of se_cmd, not a pointer target: Handle functions returning "-2" target: Use cmd->se_dev over cmd->se_lun->lun_se_dev target: Embed qr in struct se_cmd target: Replace embedded struct se_queue_req with a list_head target: Rename list_heads that are nodes in struct se_cmd to "*_node" target: Fold transport_device_setup_cmd() into lookup_{tmr,cmd}_lun() target: Make t_mem_list and t_mem_list_bidi members of t_task target: Add comment & cleanup transport_map_sg_to_mem() target: Remove unneeded checks in transport_free_pages() (Roland: Fix se_queue_req removal leftovers OOPs) (nab: Fix transport_lookup_tmr_lun failure case) (nab: Fix list_empty(&cmd->t_task.t_mem_bidi_list) inversion bugs) Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:

کامیت شده توسط
Nicholas Bellinger

والد
f22c119683
کامیت
5951146dea
@@ -90,15 +90,14 @@ int ft_queue_data_in(struct se_cmd *se_cmd)
|
||||
lport = ep->lp;
|
||||
cmd->seq = lport->tt.seq_start_next(cmd->seq);
|
||||
|
||||
task = se_cmd->t_task;
|
||||
BUG_ON(!task);
|
||||
task = &se_cmd->t_task;
|
||||
remaining = se_cmd->data_length;
|
||||
|
||||
/*
|
||||
* Setup to use first mem list entry if any.
|
||||
*/
|
||||
if (task->t_tasks_se_num) {
|
||||
mem = list_first_entry(task->t_mem_list,
|
||||
mem = list_first_entry(&task->t_mem_list,
|
||||
struct se_mem, se_list);
|
||||
mem_len = mem->se_len;
|
||||
mem_off = mem->se_off;
|
||||
@@ -236,8 +235,7 @@ void ft_recv_write_data(struct ft_cmd *cmd, struct fc_frame *fp)
|
||||
u32 f_ctl;
|
||||
void *buf;
|
||||
|
||||
task = se_cmd->t_task;
|
||||
BUG_ON(!task);
|
||||
task = &se_cmd->t_task;
|
||||
|
||||
fh = fc_frame_header_get(fp);
|
||||
if (!(ntoh24(fh->fh_f_ctl) & FC_FC_REL_OFF))
|
||||
@@ -315,7 +313,7 @@ void ft_recv_write_data(struct ft_cmd *cmd, struct fc_frame *fp)
|
||||
* Setup to use first mem list entry if any.
|
||||
*/
|
||||
if (task->t_tasks_se_num) {
|
||||
mem = list_first_entry(task->t_mem_list,
|
||||
mem = list_first_entry(&task->t_mem_list,
|
||||
struct se_mem, se_list);
|
||||
mem_len = mem->se_len;
|
||||
mem_off = mem->se_off;
|
||||
|
مرجع در شماره جدید
Block a user