* [PATCH] block: change return type to bool
@ 2018-08-16 14:51 Chengguang Xu
2018-08-16 19:44 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Chengguang Xu @ 2018-08-16 14:51 UTC (permalink / raw)
To: axboe; +Cc: linux-block, Chengguang Xu
Because blk_do_io_stat() only does a judgement about the request
contributes to IO statistics, it better changes return type to bool.
Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
---
block/blk.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk.h b/block/blk.h
index d4d67e948920..644975e85053 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -297,7 +297,7 @@ extern int blk_update_nr_requests(struct request_queue *, unsigned int);
* b) the queue had IO stats enabled when this request was started, and
* c) it's a file system request
*/
-static inline int blk_do_io_stat(struct request *rq)
+static inline bool blk_do_io_stat(struct request *rq)
{
return rq->rq_disk &&
(rq->rq_flags & RQF_IO_STAT) &&
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] block: change return type to bool
2018-08-16 14:51 [PATCH] block: change return type to bool Chengguang Xu
@ 2018-08-16 19:44 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2018-08-16 19:44 UTC (permalink / raw)
To: Chengguang Xu; +Cc: linux-block
On 8/16/18 8:51 AM, Chengguang Xu wrote:
> Because blk_do_io_stat() only does a judgement about the request
> contributes to IO statistics, it better changes return type to bool.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-16 19:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-16 14:51 [PATCH] block: change return type to bool Chengguang Xu
2018-08-16 19:44 ` Jens Axboe
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.