Linus,

 Raid resync keeps track of how much IO was generated by the process
 of resyncing an array so that it can work out how much is being
 generated by other sources, so that it can back-off the resync when
 the underlying devices are busy.

 The accounting in raid5.c isn't quite right, resulting in rebuilds
 going at the minimum speed sometime.  In particular, the variable 'i'
 is used for "the drive in question" at a point where 'i' has no
 meaningful value and "failed_num" should be used.  

 This patch fixes it.

NeilBrown



--- ./drivers/md/raid5.c        2001/05/23 01:08:55     1.1
+++ ./drivers/md/raid5.c        2001/05/23 01:17:06     1.2
@@ -1051,8 +1051,8 @@
                        action[failed_num] = WRITE+1;
                        locked++;
                        set_bit(STRIPE_INSYNC, &sh->state);
-                       if (conf->disks[i].operational)
-                               md_sync_acct(conf->disks[i].dev, bh->b_size>>9);
+                       if (conf->disks[failed_num].operational)
+                               md_sync_acct(conf->disks[failed_num].dev, 
+bh->b_size>>9);
                        else if (conf->spare)
                                md_sync_acct(conf->spare->dev, bh->b_size>>9);
 
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]

Reply via email to