aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index c5439dce0295..baea94f0670a 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -5529,6 +5529,10 @@ static int run(struct mddev *mddev)
5529 * discard data disk but write parity disk 5529 * discard data disk but write parity disk
5530 */ 5530 */
5531 stripe = stripe * PAGE_SIZE; 5531 stripe = stripe * PAGE_SIZE;
5532 /* Round up to power of 2, as discard handling
5533 * currently assumes that */
5534 while ((stripe-1) & stripe)
5535 stripe = (stripe | (stripe-1)) + 1;
5532 mddev->queue->limits.discard_alignment = stripe; 5536 mddev->queue->limits.discard_alignment = stripe;
5533 mddev->queue->limits.discard_granularity = stripe; 5537 mddev->queue->limits.discard_granularity = stripe;
5534 /* 5538 /*