Commit 2283af5b authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-2.6.26' of git://neil.brown.name/md

* 'for-2.6.26' of git://neil.brown.name/md:
  md: ensure all blocks are uptodate or locked when syncing
parents 6329d302 7a1fc53c
...@@ -2017,12 +2017,7 @@ static int __handle_issuing_new_read_requests5(struct stripe_head *sh, ...@@ -2017,12 +2017,7 @@ static int __handle_issuing_new_read_requests5(struct stripe_head *sh,
*/ */
s->uptodate++; s->uptodate++;
return 0; /* uptodate + compute == disks */ return 0; /* uptodate + compute == disks */
} else if ((s->uptodate < disks - 1) && } else if (test_bit(R5_Insync, &dev->flags)) {
test_bit(R5_Insync, &dev->flags)) {
/* Note: we hold off compute operations while checks are
* in flight, but we still prefer 'compute' over 'read'
* hence we only read if (uptodate < * disks-1)
*/
set_bit(R5_LOCKED, &dev->flags); set_bit(R5_LOCKED, &dev->flags);
set_bit(R5_Wantread, &dev->flags); set_bit(R5_Wantread, &dev->flags);
if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending)) if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment