Thread (5 messages) 5 messages, 4 authors, 2018-01-23

Re: [PATCH V2] blk-mq: introduce BLK_STS_DEV_RESOURCE

From: Ming Lei <hidden>
Date: 2018-01-23 14:27:10
Also in: dm-devel

Hello Martin,

On Tue, Jan 23, 2018 at 08:30:41AM -0500, Martin K. Petersen wrote:
Ming,
quoted
+ * Block layer and block driver specific status, which is ususally returnd
                                                                      ^^^^^^^
quoted
+ * 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help