From: Ming Lei <ming.lei@redhat.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>,
Mike Snitzer <snitzer@redhat.com>,
dm-devel@redhat.com, Laurence Oberman <loberman@redhat.com>,
Bart Van Assche <bart.vanassche@sandisk.com>
Subject: Re: [PATCH V2] blk-mq: introduce BLK_STS_DEV_RESOURCE
Date: Tue, 23 Jan 2018 22:27:10 +0800 [thread overview]
Message-ID: <20180123142709.GC9792@ming.t460p> (raw)
In-Reply-To: <yq1zi54hfcu.fsf@oracle.com>
Hello Martin,
On Tue, Jan 23, 2018 at 08:30:41AM -0500, Martin K. Petersen wrote:
>
> Ming,
>
> > + * Block layer and block driver specific status, which is ususally returnd
> ^^^^^^^
> > + * from driver to block layer in IO path.
>
> Given that the comment blurb is long and the flag not defined until
> later, it is not entirely obvious that you are documenting
> BLK_STS_DEV_RESOURCE. So please make that clear at the beginning of the
> comment.
OK, how about the following document?
/*
* BLK_STS_DEV_RESOURC: Block layer and block driver specific status,
* which is usually returned from driver to block layer in IO path.
*
* BLK_STS_DEV_RESOURCE is returned from driver to block layer if device
* related resource is run out of, but driver can guarantee that queue
* will be rerun in future for dispatching the current request when this
* resource is available.
*
* Difference with BLK_STS_RESOURCE:
* If driver isn't sure if the queue can be run again for dealing with the
* current request after this kind of resource is available, please return
* BLK_STS_SOURCE, for example, when memory allocation, DMA Mapping or other
* system resource allocation fails and IO can't be submitted to device,
* BLK_STS_RESOURCE should be used for avoiding IO hang.
*/
#define BLK_STS_DEV_RESOURCE ((__force blk_status_t)13)
Thanks,
Ming
next prev parent reply other threads:[~2018-01-23 14:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 10:56 [PATCH V2] blk-mq: introduce BLK_STS_DEV_RESOURCE Ming Lei
2018-01-23 13:30 ` Martin K. Petersen
2018-01-23 14:16 ` Ming Lei
2018-01-23 14:27 ` Ming Lei [this message]
2018-01-23 14:44 ` Mike Snitzer
2018-01-23 15:14 ` Laurence Oberman
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=20180123142709.GC9792@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@sandisk.com \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=loberman@redhat.com \
--cc=martin.petersen@oracle.com \
--cc=snitzer@redhat.com \
/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).