Re: [RFC-v4 3/3] qla2xxx: Add tcm_qla2xxx fabric module for mainline target

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

 



Hi Roland & Co,

My apologies for the delayed response here, still catching up after the
holidays..


On Mon, 2012-01-02 at 13:38 -0800, Roland Dreier wrote:
> On Fri, Dec 23, 2011 at 1:51 PM, Nicholas A. Bellinger
> <nab@xxxxxxxxxxxxxxx> wrote:
> > So the (t_transport_complete == 0) check causing the issue above should
> > be safe to remove now..  The same is true for the !cmd->se_cmd.se_dev
> > check in tcm_qla2xxx_free_cmd() as well.
> 
> Basically you're saying the following is the right fix?
> 
> --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> @@ -401,21 +401,6 @@ static void tcm_qla2xxx_complete_free(struct
> work_struct *work)
>   */
>  void tcm_qla2xxx_free_cmd(struct qla_tgt_cmd *cmd)
>  {
> -       barrier();
> -       /*
> -        * Handle tcm_qla2xxx_init_cmd() -> transport_get_lun_for_cmd()
> -        * failure case where cmd->se_cmd.se_dev was not assigned, and
> -        * a call to transport_generic_free_cmd_intr() is not possible..
> -        */
> -       if (!cmd->se_cmd.se_dev) {
> -               target_put_sess_cmd(cmd->se_cmd.se_sess, &cmd->se_cmd);
> -               transport_generic_free_cmd(&cmd->se_cmd, 0);
> -               return;
> -       }
> -
> -       if (!atomic_read(&cmd->se_cmd.t_transport_complete))
> -               target_put_sess_cmd(cmd->se_cmd.se_sess, &cmd->se_cmd);
> -
>         INIT_WORK(&cmd->work, tcm_qla2xxx_complete_free);
>         queue_work(tcm_qla2xxx_free_wq, &cmd->work);
>  }
> 
> (I'm deleting the barrier() as part of this too because it's almost certainly
> wrong... an indirect call through a function pointer that gets here is just
> as much of a compiler optimization barrier anyway).
> 

Yes, this should be fine.  I still need to verify this internally, and
will push this into lio-core/qla_tgt-3.3 after testing.

Thanks,

--nab


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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux