summaryrefslogtreecommitdiffstats
path: root/block/blk-wbt.h
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2017-03-28 00:19:41 +0200
committerJens Axboe <axboe@fb.com>2017-03-28 16:02:20 +0200
commit88eeca495ba7de749ff253376ec6be19bb05368d (patch)
treee2ff562f879d0b581028ba71a028cda9319039e5 /block/blk-wbt.h
parentblk-throttle: add interface for per-cgroup target latency (diff)
downloadlinux-88eeca495ba7de749ff253376ec6be19bb05368d.tar.xz
linux-88eeca495ba7de749ff253376ec6be19bb05368d.zip
block: track request size in blk_issue_stat
Currently there is no way to know the request size when the request is finished. Next patch will need this info. We could add extra field to record the size, but blk_issue_stat has enough space to record it, so this patch just overloads blk_issue_stat. With this, we will have 49bits to track time, which still is very long time. Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-wbt.h')
-rw-r--r--block/blk-wbt.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/block/blk-wbt.h b/block/blk-wbt.h
index 591ff2f4b2ee..ad6c78507c3a 100644
--- a/block/blk-wbt.h
+++ b/block/blk-wbt.h
@@ -32,27 +32,27 @@ enum {
static inline void wbt_clear_state(struct blk_issue_stat *stat)
{
- stat->time &= BLK_STAT_TIME_MASK;
+ stat->stat &= ~BLK_STAT_RES_MASK;
}
static inline enum wbt_flags wbt_stat_to_mask(struct blk_issue_stat *stat)
{
- return (stat->time & BLK_STAT_MASK) >> BLK_STAT_SHIFT;
+ return (stat->stat & BLK_STAT_RES_MASK) >> BLK_STAT_RES_SHIFT;
}
static inline void wbt_track(struct blk_issue_stat *stat, enum wbt_flags wb_acct)
{
- stat->time |= ((u64) wb_acct) << BLK_STAT_SHIFT;
+ stat->stat |= ((u64) wb_acct) << BLK_STAT_RES_SHIFT;
}
static inline bool wbt_is_tracked(struct blk_issue_stat *stat)
{
- return (stat->time >> BLK_STAT_SHIFT) & WBT_TRACKED;
+ return (stat->stat >> BLK_STAT_RES_SHIFT) & WBT_TRACKED;
}
static inline bool wbt_is_read(struct blk_issue_stat *stat)
{
- return (stat->time >> BLK_STAT_SHIFT) & WBT_READ;
+ return (stat->stat >> BLK_STAT_RES_SHIFT) & WBT_READ;
}
struct rq_wait {