Re: [PATCH, RFC] Move command allocation from target drivers into target core

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

 



On Wed, Apr 06, 2016 at 02:04:12PM -0700, Bart Van Assche wrote:
> Hello Nic,
> 
> In every LIO target driver there is similar code for allocating and
> freeing commands. Had you already considered to move that code from
> the target drivers into the target core, e.g. with a patch like the
> one below? So far this patch has been tested with the iSCSI protocol
> only. The ib_srpt driver has been left out because the patches for
> making that driver use percpu_ida_alloc/free are not yet upstream.

Oh, this looks nice.  Now add my suggested init/exit_cmd methods and
we'll actually have a reasonable API :)

> Introduce target_alloc_cmd() and target_free_cmd(). Remove
> se_cmd.map_tag. Instead of passing GFP_ATOMIC as the second argument
> to percpu_ida_alloc(), pass TASK_RUNNING.

I think the s/GFP_ATOMIC/TASK_RUNNING/ fix should be sent out as
a separate fix before then cleanup.

I also have to aay that an API passing state flags is highly confusing,
but that's a separate issue..
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux