block: discard granularity might not be power of 2
authorShaohua Li <shli@kernel.org>
Fri, 14 Dec 2012 03:15:36 +0000 (11:15 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 14 Dec 2012 19:46:04 +0000 (20:46 +0100)
In MD raid case, discard granularity might not be power of 2, for example, a
4-disk raid5 has 3*chunk_size discard granularity. Correct the calculation for
such cases.

Reported-by: Neil Brown <neilb@suse.de>
Signed-off-by: Shaohua Li <shli@fusionio.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

No differences found