blk-throttle.h (5f6dc7522ac2e1701c92f20b9a1a664736787728) | blk-throttle.h (cad9266abcef586aa95f6f4095781e3e55473f2a) |
---|---|
1#ifndef BLK_THROTTLE_H 2#define BLK_THROTTLE_H 3 4#include "blk-cgroup-rwstat.h" 5 6/* 7 * To implement hierarchical throttling, throtl_grps form a tree and bios 8 * are dispatched upwards level by level until they reach the top and get --- 158 unchanged lines hidden (view full) --- 167/* 168 * Internal throttling interface 169 */ 170#ifndef CONFIG_BLK_DEV_THROTTLING 171static inline int blk_throtl_init(struct gendisk *disk) { return 0; } 172static inline void blk_throtl_exit(struct gendisk *disk) { } 173static inline void blk_throtl_register(struct gendisk *disk) { } 174static inline bool blk_throtl_bio(struct bio *bio) { return false; } | 1#ifndef BLK_THROTTLE_H 2#define BLK_THROTTLE_H 3 4#include "blk-cgroup-rwstat.h" 5 6/* 7 * To implement hierarchical throttling, throtl_grps form a tree and bios 8 * are dispatched upwards level by level until they reach the top and get --- 158 unchanged lines hidden (view full) --- 167/* 168 * Internal throttling interface 169 */ 170#ifndef CONFIG_BLK_DEV_THROTTLING 171static inline int blk_throtl_init(struct gendisk *disk) { return 0; } 172static inline void blk_throtl_exit(struct gendisk *disk) { } 173static inline void blk_throtl_register(struct gendisk *disk) { } 174static inline bool blk_throtl_bio(struct bio *bio) { return false; } |
175static inline void blk_throtl_cancel_bios(struct request_queue *q) { } | 175static inline void blk_throtl_cancel_bios(struct gendisk *disk) { } |
176#else /* CONFIG_BLK_DEV_THROTTLING */ 177int blk_throtl_init(struct gendisk *disk); 178void blk_throtl_exit(struct gendisk *disk); 179void blk_throtl_register(struct gendisk *disk); 180bool __blk_throtl_bio(struct bio *bio); | 176#else /* CONFIG_BLK_DEV_THROTTLING */ 177int blk_throtl_init(struct gendisk *disk); 178void blk_throtl_exit(struct gendisk *disk); 179void blk_throtl_register(struct gendisk *disk); 180bool __blk_throtl_bio(struct bio *bio); |
181void blk_throtl_cancel_bios(struct request_queue *q); | 181void blk_throtl_cancel_bios(struct gendisk *disk); |
182 183static inline bool blk_should_throtl(struct bio *bio) 184{ 185 struct throtl_grp *tg = blkg_to_tg(bio->bi_blkg); 186 int rw = bio_data_dir(bio); 187 188 /* iops limit is always counted */ 189 if (tg->has_rules_iops[rw]) --- 19 unchanged lines hidden --- | 182 183static inline bool blk_should_throtl(struct bio *bio) 184{ 185 struct throtl_grp *tg = blkg_to_tg(bio->bi_blkg); 186 int rw = bio_data_dir(bio); 187 188 /* iops limit is always counted */ 189 if (tg->has_rules_iops[rw]) --- 19 unchanged lines hidden --- |