Kent Overstreet | 279afba | 2013-06-05 06:21:07 -0700 | [diff] [blame^] | 1 | #ifndef _BCACHE_WRITEBACK_H |
| 2 | #define _BCACHE_WRITEBACK_H |
| 3 | |
| 4 | static inline uint64_t bcache_dev_sectors_dirty(struct bcache_device *d) |
| 5 | { |
| 6 | uint64_t i, ret = 0; |
| 7 | |
| 8 | for (i = 0; i < d->nr_stripes; i++) |
| 9 | ret += atomic_read(d->stripe_sectors_dirty + i); |
| 10 | |
| 11 | return ret; |
| 12 | } |
| 13 | |
| 14 | void bcache_dev_sectors_dirty_add(struct cache_set *, unsigned, uint64_t, int); |
| 15 | void bch_writeback_queue(struct cached_dev *); |
| 16 | void bch_writeback_add(struct cached_dev *); |
| 17 | |
| 18 | void bch_sectors_dirty_init(struct cached_dev *dc); |
| 19 | void bch_cached_dev_writeback_init(struct cached_dev *); |
| 20 | |
| 21 | #endif |