summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/sysfs.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-08-17 02:13:15 -0700
committerKent Overstreet <kmo@daterainc.com>2013-11-10 21:55:55 -0800
commit2d679fc75678551485df62274edaed452becd16d (patch)
tree5ac694ced25578b0b54893f69d74bbcaa65b0b67 /drivers/md/bcache/sysfs.c
parent77c320eb46e216c17aee5c943949229ccfed6904 (diff)
bcache: Stripe size isn't necessarily a power of two
Originally I got this right... except that the divides didn't use do_div(), which broke 32 bit kernels. When I went to fix that, I forgot that the raid stripe size usually isn't a power of two... doh Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/sysfs.c')
-rw-r--r--drivers/md/bcache/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
index 4211d82179fc..b3a66f17231d 100644
--- a/drivers/md/bcache/sysfs.c
+++ b/drivers/md/bcache/sysfs.c
@@ -157,7 +157,7 @@ SHOW(__bch_cached_dev)
sysfs_hprint(dirty_data,
bcache_dev_sectors_dirty(&dc->disk) << 9);
- sysfs_hprint(stripe_size, (1 << dc->disk.stripe_size_bits) << 9);
+ sysfs_hprint(stripe_size, dc->disk.stripe_size << 9);
var_printf(partial_stripes_expensive, "%u");
var_printf(sequential_merge, "%i");