aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/bcache.h
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2013-06-05 09:21:07 -0400
committerKent Overstreet <koverstreet@google.com>2013-06-27 00:57:23 -0400
commit279afbad4e54acbd61bf88a54a73af3bbfdeb5dd (patch)
treeaefebaa3a7f54049904a275ca3035301603a9be1 /drivers/md/bcache/bcache.h
parent444fc0b6b167ed164e7436621a9d095e042644dd (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.h10
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
1162void bch_writeback_queue(struct cached_dev *);
1163void bch_writeback_add(struct cached_dev *, unsigned);
1164
1165void bch_count_io_errors(struct cache *, int, const char *); 1165void bch_count_io_errors(struct cache *, int, const char *);
1166void bch_bbio_count_io_errors(struct cache_set *, struct bio *, 1166void 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 *);
1224struct cache_set *bch_cache_set_alloc(struct cache_sb *); 1224struct cache_set *bch_cache_set_alloc(struct cache_sb *);
1225void bch_btree_cache_free(struct cache_set *); 1225void bch_btree_cache_free(struct cache_set *);
1226int bch_btree_cache_alloc(struct cache_set *); 1226int bch_btree_cache_alloc(struct cache_set *);
1227void bch_sectors_dirty_init(struct cached_dev *);
1228void bch_cached_dev_writeback_init(struct cached_dev *);
1229void bch_moving_init_cache_set(struct cache_set *); 1227void bch_moving_init_cache_set(struct cache_set *);
1230 1228
1231int bch_cache_allocator_start(struct cache *ca); 1229int bch_cache_allocator_start(struct cache *ca);