Re: [PATCH-v3.14.y 4/8] target: Fix LUN_RESET active I/O handling for ACK_KREF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jiri,

On Tue, 2016-03-08 at 16:08 +0100, Jiri Slaby wrote:
> On 03/06/2016, 03:55 AM, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> > 
> > [ Upstream commit febe562c20dfa8f33bee7d419c6b517986a5aa33 ]
> ...
> > --- a/drivers/target/target_core_transport.c
> > +++ b/drivers/target/target_core_transport.c
> ...
> > @@ -536,10 +533,6 @@ static int transport_cmd_check_stop(struct se_cmd *cmd, bool remove_from_lists,
> >  {
> >  	unsigned long flags;
> >  
> > -	spin_lock_irqsave(&cmd->t_state_lock, flags);
> > -	if (write_pending)
> > -		cmd->t_state = TRANSPORT_WRITE_PENDING;
> > -
> 
> I tried to backport this to 3.12, 

Likewise, with 3.10.y I'm currently running into a blocker wrt
se_lun->lun_ref support being a v3.13 and later feature.

> but I think it is impossible to move
> the lock below. The code still has this here:
> 
>         if (cmd->transport_state & CMD_T_LUN_STOP) {
>                 pr_debug("%s:%d CMD_T_LUN_STOP for ITT: 0x%08x\n",
>                         __func__, __LINE__, cmd->se_tfo->get_task_tag(cmd));
> 
>                 cmd->transport_state &= ~CMD_T_ACTIVE;
>                 if (remove_from_lists)
>                         target_remove_from_state_list(cmd);
>                 spin_unlock_irqrestore(&cmd->t_state_lock, flags);
> 
>                 complete(&cmd->transport_lun_stop_comp);
>                 return 1;
>         }
> 
> And it seems transport_state needs the lock, right?

This would end up being dropped with a proper se_lun->lun_ref backport
in place..

So I'll take another stab at this some point, but me thinks it's going
to end up requiring se_lun->lun_ref support in v3.12 + earlier code to
work.

On a side note, the bugs this series addresses aren't being actively
triggered in v3.12 code, as the COMPARE_AND_WRITE emulation causing the
aggressive multi-port TMRs to be generated by ESX to trigger this bug
weren't introduced until v3.14+.

Thank you,

--nab

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]