Re: [PATCH 13/20] target/iscsi: Reduce number of __iscsit_free_cmd() callers

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

 



On Sat, Jun 23, 2018 at 03:23:00AM +0530, Bart Van Assche wrote:
> Instead of calling __iscsit_free_cmd() from inside iscsit_aborted_task()
> if a command has been aborted and from inside iscsit_free_cmd() if a
> command has not been aborted, call __iscsit_free_cmd() from inside
> lio_release_cmd(). The latter function is namely called for all commands
> once the reference count has dropped to zero.
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxx>
> Reviewed-by: Mike Christie <mchristi@xxxxxxxxxx>
> Cc: Varun Prakash <varun@xxxxxxxxxxx>
> Cc: Hannes Reinecke <hare@xxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>
> ---
>  drivers/target/iscsi/iscsi_target.c          | 2 --
>  drivers/target/iscsi/iscsi_target_configfs.c | 1 +
>  drivers/target/iscsi/iscsi_target_util.c     | 4 +---
>  3 files changed, 2 insertions(+), 5 deletions(-)
> 

Hi Bart,

cxgbit driver is not working with this patch as transport_free_pages()
is called before calling conn->conn_transport->iscsit_release_cmd(), cxgbit
driver calls dma_unmap_sg() in ->iscsit_release_cmd(), transport_free_pages()
frees the scatterlist pages so dma unmap will not work.

cxgbit driver needs a callback before target frees the pages
so that it can dma unmap.

We can remove ->iscsit_release_cmd() from __iscsit_free_cmd() and call it
directly from iscsit_free_cmd(), iscsit_aborted_task().    

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