Version:  2.0.40 2.2.26 2.4.37 3.13 3.14 3.15 3.16 3.17 3.18 3.19 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10

Linux/block/blk-stat.h

  1 #ifndef BLK_STAT_H
  2 #define BLK_STAT_H
  3 
  4 /*
  5  * ~0.13s window as a power-of-2 (2^27 nsecs)
  6  */
  7 #define BLK_STAT_NSEC           134217728ULL
  8 #define BLK_STAT_NSEC_MASK      ~(BLK_STAT_NSEC - 1)
  9 
 10 /*
 11  * Upper 3 bits can be used elsewhere
 12  */
 13 #define BLK_STAT_RES_BITS       3
 14 #define BLK_STAT_SHIFT          (64 - BLK_STAT_RES_BITS)
 15 #define BLK_STAT_TIME_MASK      ((1ULL << BLK_STAT_SHIFT) - 1)
 16 #define BLK_STAT_MASK           ~BLK_STAT_TIME_MASK
 17 
 18 enum {
 19         BLK_STAT_READ   = 0,
 20         BLK_STAT_WRITE,
 21 };
 22 
 23 void blk_stat_add(struct blk_rq_stat *, struct request *);
 24 void blk_hctx_stat_get(struct blk_mq_hw_ctx *, struct blk_rq_stat *);
 25 void blk_queue_stat_get(struct request_queue *, struct blk_rq_stat *);
 26 void blk_stat_clear(struct request_queue *);
 27 void blk_stat_init(struct blk_rq_stat *);
 28 bool blk_stat_is_current(struct blk_rq_stat *);
 29 void blk_stat_set_issue_time(struct blk_issue_stat *);
 30 bool blk_stat_enable(struct request_queue *);
 31 
 32 static inline u64 __blk_stat_time(u64 time)
 33 {
 34         return time & BLK_STAT_TIME_MASK;
 35 }
 36 
 37 static inline u64 blk_stat_time(struct blk_issue_stat *stat)
 38 {
 39         return __blk_stat_time(stat->time);
 40 }
 41 
 42 #endif
 43 

This page was automatically generated by LXR 0.3.1 (source).  •  Linux is a registered trademark of Linus Torvalds  •  Contact us