diff options
Diffstat (limited to 'include/linux/blkdev.h')
| -rw-r--r-- | include/linux/blkdev.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 4a2ab7c85393..3a6fea7460f1 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -540,8 +540,7 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) | |||
| 540 | 540 | ||
| 541 | #define blk_account_rq(rq) \ | 541 | #define blk_account_rq(rq) \ |
| 542 | (((rq)->cmd_flags & REQ_STARTED) && \ | 542 | (((rq)->cmd_flags & REQ_STARTED) && \ |
| 543 | ((rq)->cmd_type == REQ_TYPE_FS || \ | 543 | ((rq)->cmd_type == REQ_TYPE_FS)) |
| 544 | ((rq)->cmd_flags & REQ_DISCARD))) | ||
| 545 | 544 | ||
| 546 | #define blk_pm_request(rq) \ | 545 | #define blk_pm_request(rq) \ |
| 547 | ((rq)->cmd_type == REQ_TYPE_PM_SUSPEND || \ | 546 | ((rq)->cmd_type == REQ_TYPE_PM_SUSPEND || \ |
| @@ -595,17 +594,16 @@ static inline void blk_clear_rl_full(struct request_list *rl, bool sync) | |||
| 595 | rl->flags &= ~flag; | 594 | rl->flags &= ~flag; |
| 596 | } | 595 | } |
| 597 | 596 | ||
| 597 | static inline bool rq_mergeable(struct request *rq) | ||
| 598 | { | ||
| 599 | if (rq->cmd_type != REQ_TYPE_FS) | ||
| 600 | return false; | ||
| 598 | 601 | ||
| 599 | /* | 602 | if (rq->cmd_flags & REQ_NOMERGE_FLAGS) |
| 600 | * mergeable request must not have _NOMERGE or _BARRIER bit set, nor may | 603 | return false; |
| 601 | * it already be started by driver. | 604 | |
| 602 | */ | 605 | return true; |
| 603 | #define RQ_NOMERGE_FLAGS \ | 606 | } |
| 604 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA | REQ_DISCARD) | ||
| 605 | #define rq_mergeable(rq) \ | ||
| 606 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ | ||
| 607 | (((rq)->cmd_flags & REQ_DISCARD) || \ | ||
| 608 | (rq)->cmd_type == REQ_TYPE_FS)) | ||
| 609 | 607 | ||
| 610 | /* | 608 | /* |
| 611 | * q->prep_rq_fn return values | 609 | * q->prep_rq_fn return values |
