diff options
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 727886d25c4e..e9eb35c9bf26 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -541,7 +541,7 @@ enum { | |||
541 | #define blk_noretry_request(rq) ((rq)->cmd_flags & REQ_FAILFAST) | 541 | #define blk_noretry_request(rq) ((rq)->cmd_flags & REQ_FAILFAST) |
542 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) | 542 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) |
543 | 543 | ||
544 | #define blk_account_rq(rq) (blk_rq_started(rq) && blk_fs_request(rq)) | 544 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) |
545 | 545 | ||
546 | #define blk_pm_suspend_request(rq) ((rq)->cmd_type == REQ_TYPE_PM_SUSPEND) | 546 | #define blk_pm_suspend_request(rq) ((rq)->cmd_type == REQ_TYPE_PM_SUSPEND) |
547 | #define blk_pm_resume_request(rq) ((rq)->cmd_type == REQ_TYPE_PM_RESUME) | 547 | #define blk_pm_resume_request(rq) ((rq)->cmd_type == REQ_TYPE_PM_RESUME) |
@@ -598,7 +598,8 @@ static inline void blk_clear_queue_full(struct request_queue *q, int rw) | |||
598 | #define RQ_NOMERGE_FLAGS \ | 598 | #define RQ_NOMERGE_FLAGS \ |
599 | (REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER) | 599 | (REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER) |
600 | #define rq_mergeable(rq) \ | 600 | #define rq_mergeable(rq) \ |
601 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && blk_fs_request((rq))) | 601 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ |
602 | (blk_discard_rq(rq) || blk_fs_request((rq)))) | ||
602 | 603 | ||
603 | /* | 604 | /* |
604 | * q->prep_rq_fn return values | 605 | * q->prep_rq_fn return values |