diff options
author | Kent Overstreet <koverstreet@google.com> | 2013-06-05 09:21:07 -0400 |
---|---|---|
committer | Kent Overstreet <koverstreet@google.com> | 2013-06-27 00:57:23 -0400 |
commit | 279afbad4e54acbd61bf88a54a73af3bbfdeb5dd (patch) | |
tree | aefebaa3a7f54049904a275ca3035301603a9be1 /drivers/md/bcache/bcache.h | |
parent | 444fc0b6b167ed164e7436621a9d095e042644dd (diff) |
bcache: Track dirty data by stripe
To make background writeback aware of raid5/6 stripes, we first need to
track the amount of dirty data within each stripe - we do this by
breaking up the existing sectors_dirty into per stripe atomic_ts
Signed-off-by: Kent Overstreet <koverstreet@google.com>
Diffstat (limited to 'drivers/md/bcache/bcache.h')
-rw-r--r-- | drivers/md/bcache/bcache.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h index d099d8894c2f..dbddef0cdb59 100644 --- a/drivers/md/bcache/bcache.h +++ b/drivers/md/bcache/bcache.h | |||
@@ -437,7 +437,10 @@ struct bcache_device { | |||
437 | /* If nonzero, we're detaching/unregistering from cache set */ | 437 | /* If nonzero, we're detaching/unregistering from cache set */ |
438 | atomic_t detaching; | 438 | atomic_t detaching; |
439 | 439 | ||
440 | atomic_long_t sectors_dirty; | 440 | uint64_t nr_stripes; |
441 | unsigned stripe_size_bits; | ||
442 | atomic_t *stripe_sectors_dirty; | ||
443 | |||
441 | unsigned long sectors_dirty_last; | 444 | unsigned long sectors_dirty_last; |
442 | long sectors_dirty_derivative; | 445 | long sectors_dirty_derivative; |
443 | 446 | ||
@@ -1159,9 +1162,6 @@ static inline void wake_up_allocators(struct cache_set *c) | |||
1159 | 1162 | ||
1160 | /* Forward declarations */ | 1163 | /* Forward declarations */ |
1161 | 1164 | ||
1162 | void bch_writeback_queue(struct cached_dev *); | ||
1163 | void bch_writeback_add(struct cached_dev *, unsigned); | ||
1164 | |||
1165 | void bch_count_io_errors(struct cache *, int, const char *); | 1165 | void bch_count_io_errors(struct cache *, int, const char *); |
1166 | void bch_bbio_count_io_errors(struct cache_set *, struct bio *, | 1166 | void bch_bbio_count_io_errors(struct cache_set *, struct bio *, |
1167 | int, const char *); | 1167 | int, const char *); |
@@ -1224,8 +1224,6 @@ void bch_cache_set_stop(struct cache_set *); | |||
1224 | struct cache_set *bch_cache_set_alloc(struct cache_sb *); | 1224 | struct cache_set *bch_cache_set_alloc(struct cache_sb *); |
1225 | void bch_btree_cache_free(struct cache_set *); | 1225 | void bch_btree_cache_free(struct cache_set *); |
1226 | int bch_btree_cache_alloc(struct cache_set *); | 1226 | int bch_btree_cache_alloc(struct cache_set *); |
1227 | void bch_sectors_dirty_init(struct cached_dev *); | ||
1228 | void bch_cached_dev_writeback_init(struct cached_dev *); | ||
1229 | void bch_moving_init_cache_set(struct cache_set *); | 1227 | void bch_moving_init_cache_set(struct cache_set *); |
1230 | 1228 | ||
1231 | int bch_cache_allocator_start(struct cache *ca); | 1229 | int bch_cache_allocator_start(struct cache *ca); |