aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-01-19 12:03:35 +0800
committerAlex Shi <alex.shi@linaro.org>2017-01-19 12:03:35 +0800
commitd28996d022a87e81bd6d4bedd5990b68d7e4d567 (patch)
tree8b7a18ca2701b77a626a0e3c155d5e63a7fa99a6 /drivers/md/raid5.c
parentec54c473486f2addc56e99c1191e4975123930d7 (diff)
parent108df9c204f549150c7e1e3262ffd19bd624269e (diff)
Merge branch 'linux-linaro-lsk-v3.18' into linux-linaro-lsk-v3.18-rtlsk-v3.18-17.02-rt
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index ec8cd8b31909..e7ce94eac739 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -6206,6 +6206,15 @@ static int run(struct mddev *mddev)
stripe = (stripe | (stripe-1)) + 1;
mddev->queue->limits.discard_alignment = stripe;
mddev->queue->limits.discard_granularity = stripe;
+
+ /*
+ * We use 16-bit counter of active stripes in bi_phys_segments
+ * (minus one for over-loaded initialization)
+ */
+ blk_queue_max_hw_sectors(mddev->queue, 0xfffe * STRIPE_SECTORS);
+ blk_queue_max_discard_sectors(mddev->queue,
+ 0xfffe * STRIPE_SECTORS);
+
/*
* unaligned part of discard request will be ignored, so can't
* guarantee discard_zeroes_data