Re: [PATCH 39/42] target: Call transport_new_cmd instead of adding to cmd queue

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

 



On Tue, May 31, 2011 at 02:32:47AM -0700, Nicholas A. Bellinger wrote:
> -static void transport_add_cmd_to_queue(
> +static int transport_add_cmd_to_queue(
>         struct se_cmd *cmd,
>         int t_state)
>  {
> @@ -775,6 +776,8 @@ static void transport_add_cmd_to_queue(
> 
>         atomic_inc(&qobj->queue_cnt);
>         wake_up_interruptible(&qobj->thread_wq);
> +
> +       return 0;
>  }
> 
>  static struct se_cmd *
> @@ -1847,9 +1850,14 @@ int transport_generic_handle_cdb(
>                 printk(KERN_ERR "cmd->se_lun is NULL\n");
>                 return -EINVAL;
>         }
> -
> -       transport_add_cmd_to_queue(cmd, TRANSPORT_NEW_CMD);
> -       return 0;
> +       /*
> +        * Assume that target fabrics not presenting an cmd->se_tfo->new_cmd_map
> +        * function pointer (like iscsi-target) want direct execution of
> +        * transport_generic_new_cmd()
> +        */
> +       return (cmd->se_tfo->new_cmd_map) ?
> +               transport_add_cmd_to_queue(cmd, TRANSPORT_NEW_CMD) :
> +               transport_generic_new_cmd(cmd);
>  }

This it too ugly to live, please revert it.

The proper way to do it is to simply mark transport_generic_new_cmd
non-static and call it directly from the iscsi code.

--
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