Message ID | 1459455431-12687-51-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 0d4f7b1..a6917f0 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -6958,8 +6958,8 @@ static int run(struct mddev *mddev) } if (discard_supported && - mddev->queue->limits.max_discard_sectors >= stripe && - mddev->queue->limits.discard_granularity >= stripe) + mddev->queue->limits.max_discard_sectors >= (stripe >> 9) && + mddev->queue->limits.discard_granularity >= stripe) queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, mddev->queue); else