All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Max Gurtovoy <maxg@mellanox.com>
Cc: sagi@grimberg.me, martin.petersen@oracle.com,
	israelr@mellanox.com, james.smart@broadcom.com,
	linux-nvme@lists.infradead.org, keith.busch@intel.com,
	hch@lst.de
Subject: Re: [PATCH 1/3] nvme: introduce nvme_finish_cmd function
Date: Mon, 2 Sep 2019 17:13:48 +0200	[thread overview]
Message-ID: <20190902151348.GA5034@lst.de> (raw)
In-Reply-To: <1567436462-23218-1-git-send-email-maxg@mellanox.com>

On Mon, Sep 02, 2019 at 06:01:00PM +0300, Max Gurtovoy wrote:
> This function should be called by every transport during complete callback
> upon successful submission of the request. Thus, in case of a failure in
> command submission and in case nvme_setup_cmd was called, the transport
> should call nvme_cleanup_cmd in the error flow to avoid resource leakage.
> Add this logic to all the underlaying transports.

The idea looks good, but I'm a little worried about the confusion
the two functions create.  I remember we once had the idea of lifting
the pi_type into the core block layer, in which case we could do
the t10_pi_complete call inside blk_mq_end_request instead of having
drivers deal with it.  Same for the t10_pi_prepare call on the
submissions side.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  parent reply	other threads:[~2019-09-02 15:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 15:01 [PATCH 1/3] nvme: introduce nvme_finish_cmd function Max Gurtovoy
2019-09-02 15:01 ` [PATCH 2/3] nvmet-loop: use nvme_finish_cmd during complete callback Max Gurtovoy
2019-09-02 15:14   ` Christoph Hellwig
2019-09-02 15:01 ` [PATCH 3/3] nvme-rdma: avoid un-needed dereference of request sqe Max Gurtovoy
2019-09-02 15:14   ` Christoph Hellwig
2019-09-02 15:13 ` Christoph Hellwig [this message]
2019-09-02 15:42   ` [PATCH 1/3] nvme: introduce nvme_finish_cmd function Max Gurtovoy
2019-09-02 15:47     ` Christoph Hellwig

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=20190902151348.GA5034@lst.de \
    --to=hch@lst.de \
    --cc=israelr@mellanox.com \
    --cc=james.smart@broadcom.com \
    --cc=keith.busch@intel.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=martin.petersen@oracle.com \
    --cc=maxg@mellanox.com \
    --cc=sagi@grimberg.me \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.