Re: [PATCH v4 17/37] target: Introduce a target driver reference count per command

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

 



On Thu, 2017-02-09 at 02:07 -0800, Nicholas A. Bellinger wrote:
> I'm strongly opposed to adding another reference count and struct
> completion to every se_cmd, and using a special version of
> __target_put_sess_cmd() sprinkled all over the place.
> 
> We've already got a se_cmd->cmd_kref, se_cmd->t_transport_stop_comp used
> for se_cmd quiesce (CMD_T_STOP) during CMD_T_ABORT and
> transport_generic_free_cmd() shutdown, and se_cmd->cmd_wait_set for
> drivers doing active I/O shutdown via target_sess_cmd_list_set_waiting.
> 
> Adding a new reference count, a third struct completion, and fast path
> complete_all() for everyone (not just CMD_T_ABORT) just to get rid of
> se_cmd->cmd_wait_set doesn't simplify anything.
> 
> So that said, dropping this patch until you can figure out how to use
> the single existing se_cmd->cmd_kref.

It is very ugly that there are multiple direct calls of .release_cmd() in
the target code. That is just not acceptable. The only way to address
this is by introducing a second reference count in struct se_cmd. We need
one reference count to keep track of the lifetime of struct se_cmd and a
second reference count to keep track of the number of references held by
the target driver.

Regarding t_transport_stop_comp: my plan is to remove that completion later
on.

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