summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/sysfs.c
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2013-06-05 17:21:07 +0400
committerKent Overstreet <koverstreet@google.com>2013-06-27 08:57:23 +0400
commit279afbad4e54acbd61bf88a54a73af3bbfdeb5dd (patch)
treeaefebaa3a7f54049904a275ca3035301603a9be1 /drivers/md/bcache/sysfs.c
parent444fc0b6b167ed164e7436621a9d095e042644dd (diff)
downloadlinux-279afbad4e54acbd61bf88a54a73af3bbfdeb5dd.tar.xz
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/sysfs.c')
-rw-r--r--drivers/md/bcache/sysfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
index f5c2d8695230..cf8d91ec3238 100644
--- a/drivers/md/bcache/sysfs.c
+++ b/drivers/md/bcache/sysfs.c
@@ -9,6 +9,7 @@
#include "sysfs.h"
#include "btree.h"
#include "request.h"
+#include "writeback.h"
#include <linux/blkdev.h>
#include <linux/sort.h>
@@ -128,7 +129,7 @@ SHOW(__bch_cached_dev)
char derivative[20];
char target[20];
bch_hprint(dirty,
- atomic_long_read(&dc->disk.sectors_dirty) << 9);
+ bcache_dev_sectors_dirty(&dc->disk) << 9);
bch_hprint(derivative, dc->writeback_rate_derivative << 9);
bch_hprint(target, dc->writeback_rate_target << 9);
@@ -144,7 +145,7 @@ SHOW(__bch_cached_dev)
}
sysfs_hprint(dirty_data,
- atomic_long_read(&dc->disk.sectors_dirty) << 9);
+ bcache_dev_sectors_dirty(&dc->disk) << 9);
var_printf(sequential_merge, "%i");
var_hprint(sequential_cutoff);