Re: [PATCH 03/13] target: add workqueue based cmd submission

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

 



On 2/9/21 12:43 PM, Mike Christie wrote:
> On 2/9/21 9:48 AM, Bodo Stroesser wrote:
>> On 09.02.21 13:38, Mike Christie wrote:
>>>   +void target_queued_submit_work(struct work_struct *work)
>>> +{
>>> +    struct se_cmd_queue *sq = container_of(work, struct se_cmd_queue, work);
>>> +    struct se_cmd *se_cmd, *next_cmd;
>>> +    struct llist_node *cmd_list;
>>> +    unsigned char *cdb;
>>> +
>>> +    cmd_list = llist_del_all(&sq->cmd_list);
>>> +    if (!cmd_list)
>>> +        /* Previous call took what we were queued to submit */
>>> +        return;
>>> +
>>> +    cmd_list = llist_reverse_order(cmd_list);
>>> +    llist_for_each_entry_safe(se_cmd, next_cmd, cmd_list, se_cmd_list) {
>>> +        cdb = se_cmd->se_tfo->get_cdb(se_cmd);
>>
>> If I got it right, get_cdb is a new, optional callback.
>> So, should we check, whether it is set?
> 
> I think a check is not really useful. The caller has to implement it
> if they call target_queue_cmd_submit. It would be a BUG() and so
> either way you would get a crash when you are developing a patch.

I'll actually add the BUG. It looks like it's preferred in the lio code.



[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