diff options
author | Tang Junhui <tang.junhui@zte.com.cn> | 2018-03-19 01:36:20 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-03-19 03:15:20 +0100 |
commit | 688892b3bc05e25da94866e32210e5f503f16f69 (patch) | |
tree | ffdcf7b5853802c547860a4ca76da2ccff2f85c8 /drivers/md/dm-sysfs.c | |
parent | bcache: fix inaccurate io state for detached bcache devices (diff) | |
download | linux-688892b3bc05e25da94866e32210e5f503f16f69.tar.xz linux-688892b3bc05e25da94866e32210e5f503f16f69.zip |
bcache: fix incorrect sysfs output value of strip size
Stripe size is shown as zero when no strip in back end device:
[root@ceph132 ~]# cat /sys/block/sdd/bcache/stripe_size
0.0k
Actually it should be 1T Bytes (1 << 31 sectors), but in sysfs
interface, stripe_size was changed from sectors to bytes, and move
9 bits left, so the 32 bits variable overflows.
This patch change the variable to a 64 bits type before moving bits.
Signed-off-by: Tang Junhui <tang.junhui@zte.com.cn>
Reviewed-by: Michael Lyle <mlyle@lyle.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/dm-sysfs.c')
0 files changed, 0 insertions, 0 deletions