From: Varun Prakash <varun@chelsio.com>
To: target-devel@vger.kernel.org
Subject: Re: [PATCH 13/20] target/iscsi: Reduce number of __iscsit_free_cmd() callers
Date: Thu, 26 Jul 2018 11:24:04 +0000 [thread overview]
Message-ID: <20180726111000.GA2015@chelsio.com> (raw)
In-Reply-To: <20180622215307.8758-14-bart.vanassche@wdc.com>
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@wdc.com>
> Reviewed-by: Mike Christie <mchristi@redhat.com>
> Cc: Varun Prakash <varun@chelsio.com>
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Christoph Hellwig <hch@lst.de>
> ---
> 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
next prev parent reply other threads:[~2018-07-26 11:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-22 21:53 [PATCH 13/20] target/iscsi: Reduce number of __iscsit_free_cmd() callers Bart Van Assche
2018-07-26 11:24 ` Varun Prakash [this message]
2018-07-26 17:10 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180726111000.GA2015@chelsio.com \
--to=varun@chelsio.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).