X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=drivers%2Fmd%2Fbcache%2Fsuper.c;h=93791e46b1e8f76f4d671d017c49f6f56a9702fc;hb=09bdafb89a56a267c070fdb96d385934c14d2735;hp=0ae2b3676293074a1621226ceee76f0cac6b5d63;hpb=f493fedcc3016e46ecbf7ab9490ba4762723efab;p=platform%2Fkernel%2Flinux-starfive.git diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 0ae2b36..93791e4 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -905,6 +905,8 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size, if (!d->stripe_size) d->stripe_size = 1 << 31; + else if (d->stripe_size < BCH_MIN_STRIPE_SZ) + d->stripe_size = roundup(BCH_MIN_STRIPE_SZ, d->stripe_size); n = DIV_ROUND_UP_ULL(sectors, d->stripe_size); if (!n || n > max_stripes) {