aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-11 04:46:50 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-11 04:46:50 -0400
commit0c81b2a1448bc6a2a9b2d6469fb0669fb4b25e5b (patch)
tree6f82579cae6d6e39fa9f837a3c349ded51e19d14 /drivers/md/raid5.c
parent0729fbf3bc70870370b4f43d652f05a468dc68b8 (diff)
parent70ff05554f91a1edda1f11684da1dbde09e2feea (diff)
Merge branch 'linus' into core/rcu
Conflicts: include/linux/rculist.h kernel/rcupreempt.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index c37e256b1176..3b27df52456b 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -2017,12 +2017,7 @@ static int __handle_issuing_new_read_requests5(struct stripe_head *sh,
2017 */ 2017 */
2018 s->uptodate++; 2018 s->uptodate++;
2019 return 0; /* uptodate + compute == disks */ 2019 return 0; /* uptodate + compute == disks */
2020 } else if ((s->uptodate < disks - 1) && 2020 } else if (test_bit(R5_Insync, &dev->flags)) {
2021 test_bit(R5_Insync, &dev->flags)) {
2022 /* Note: we hold off compute operations while checks are
2023 * in flight, but we still prefer 'compute' over 'read'
2024 * hence we only read if (uptodate < * disks-1)
2025 */
2026 set_bit(R5_LOCKED, &dev->flags); 2021 set_bit(R5_LOCKED, &dev->flags);
2027 set_bit(R5_Wantread, &dev->flags); 2022 set_bit(R5_Wantread, &dev->flags);
2028 if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending)) 2023 if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending))
@@ -2898,6 +2893,8 @@ static void handle_stripe5(struct stripe_head *sh)
2898 2893
2899 for (i = conf->raid_disks; i--; ) { 2894 for (i = conf->raid_disks; i--; ) {
2900 set_bit(R5_Wantwrite, &sh->dev[i].flags); 2895 set_bit(R5_Wantwrite, &sh->dev[i].flags);
2896 set_bit(R5_LOCKED, &dev->flags);
2897 s.locked++;
2901 if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending)) 2898 if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending))
2902 sh->ops.count++; 2899 sh->ops.count++;
2903 } 2900 }
@@ -2911,6 +2908,7 @@ static void handle_stripe5(struct stripe_head *sh)
2911 conf->raid_disks); 2908 conf->raid_disks);
2912 s.locked += handle_write_operations5(sh, 1, 1); 2909 s.locked += handle_write_operations5(sh, 1, 1);
2913 } else if (s.expanded && 2910 } else if (s.expanded &&
2911 s.locked == 0 &&
2914 !test_bit(STRIPE_OP_POSTXOR, &sh->ops.pending)) { 2912 !test_bit(STRIPE_OP_POSTXOR, &sh->ops.pending)) {
2915 clear_bit(STRIPE_EXPAND_READY, &sh->state); 2913 clear_bit(STRIPE_EXPAND_READY, &sh->state);
2916 atomic_dec(&conf->reshape_stripes); 2914 atomic_dec(&conf->reshape_stripes);
@@ -4305,7 +4303,9 @@ static int run(mddev_t *mddev)
4305 " disk %d\n", bdevname(rdev->bdev,b), 4303 " disk %d\n", bdevname(rdev->bdev,b),
4306 raid_disk); 4304 raid_disk);
4307 working_disks++; 4305 working_disks++;
4308 } 4306 } else
4307 /* Cannot rely on bitmap to complete recovery */
4308 conf->fullsync = 1;
4309 } 4309 }
4310 4310
4311 /* 4311 /*