All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Ming Lei <ming.lei@redhat.com>, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Sagi Grimberg <sagi@grimberg.me>,
	Bart Van Assche <bvanassche@acm.org>,
	James Smart <james.smart@broadcom.com>,
	Christoph Hellwig <hch@lst.de>,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH V3 1/2] blk-mq: introduce blk_mq_complete_request_sync()
Date: Mon, 8 Apr 2019 18:16:52 +0200	[thread overview]
Message-ID: <20190408161652.GA4381@lst.de> (raw)
In-Reply-To: <20190408161505.GA32613@localhost.localdomain>

On Mon, Apr 08, 2019 at 10:15:05AM -0600, Keith Busch wrote:
> > +bool blk_mq_complete_request_sync(struct request *rq)
> > +{
> > +	if (unlikely(blk_should_fake_timeout(rq->q)))
> > +		return false;
> > +
> > +	WRITE_ONCE(rq->state, MQ_RQ_COMPLETE);
> > +	rq->q->mq_ops->complete(rq);
> > +	return true;
> > +}
> > +EXPORT_SYMBOL_GPL(blk_mq_complete_request_sync);
> 
> Could we possibly drop the fake timeout in this path? We're using this
> in error handling that is past pretending completing requests didn't
> happen.

.. and at that point we can also drop the return value.

WARNING: multiple messages have this Message-ID (diff)
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH V3 1/2] blk-mq: introduce blk_mq_complete_request_sync()
Date: Mon, 8 Apr 2019 18:16:52 +0200	[thread overview]
Message-ID: <20190408161652.GA4381@lst.de> (raw)
In-Reply-To: <20190408161505.GA32613@localhost.localdomain>

On Mon, Apr 08, 2019@10:15:05AM -0600, Keith Busch wrote:
> > +bool blk_mq_complete_request_sync(struct request *rq)
> > +{
> > +	if (unlikely(blk_should_fake_timeout(rq->q)))
> > +		return false;
> > +
> > +	WRITE_ONCE(rq->state, MQ_RQ_COMPLETE);
> > +	rq->q->mq_ops->complete(rq);
> > +	return true;
> > +}
> > +EXPORT_SYMBOL_GPL(blk_mq_complete_request_sync);
> 
> Could we possibly drop the fake timeout in this path? We're using this
> in error handling that is past pretending completing requests didn't
> happen.

.. and at that point we can also drop the return value.

  reply	other threads:[~2019-04-08 16:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08  9:40 [PATCH V3 0/2] blk-mq/nvme: cancel request synchronously Ming Lei
2019-04-08  9:40 ` Ming Lei
2019-04-08  9:40 ` [PATCH V3 1/2] blk-mq: introduce blk_mq_complete_request_sync() Ming Lei
2019-04-08  9:40   ` Ming Lei
2019-04-08 16:15   ` Keith Busch
2019-04-08 16:15     ` Keith Busch
2019-04-08 16:16     ` Christoph Hellwig [this message]
2019-04-08 16:16       ` Christoph Hellwig
2019-04-08  9:40 ` [PATCH V3 2/2] nvme: cancel request synchronously Ming Lei
2019-04-08  9:40   ` Ming Lei

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=20190408161652.GA4381@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=james.smart@broadcom.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=ming.lei@redhat.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.