Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 335970
b: refs/heads/master
c: 4ac6875
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown committed Nov 20, 2012
1 parent 6a8e540 commit 3e7782f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5eff3c439d3478ba9e8ba5f8c0aaf6e6fadb6e58
refs/heads/master: 4ac6875eeb97a49bad7bc8d56b5ec935904fc6e7
4 changes: 4 additions & 0 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -5529,6 +5529,10 @@ static int run(struct mddev *mddev)
* discard data disk but write parity disk
*/
stripe = stripe * PAGE_SIZE;
/* Round up to power of 2, as discard handling
* currently assumes that */
while ((stripe-1) & stripe)
stripe = (stripe | (stripe-1)) + 1;
mddev->queue->limits.discard_alignment = stripe;
mddev->queue->limits.discard_granularity = stripe;
/*
Expand Down

0 comments on commit 3e7782f

Please sign in to comment.