Re: [PATCH git-md-accel 1/2] raid5: refactor handle_stripe5 and handle_stripe6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/18/07, Dan Williams <dan.j.williams@xxxxxxxxx> wrote:
...
+static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh,
+                               struct r6_state *r6s)
+{
+       int i;
+
+       /* We have read all the blocks in this stripe and now we need to
+        * copy some of them into a target stripe for expand.
+        */
+       clear_bit(STRIPE_EXPAND_SOURCE, &sh->state);
+       for (i = 0; i < sh->disks; i++)
+               if (i != sh->pd_idx && (r6s && i != r6s->qd_idx)) {
+                       int dd_idx, pd_idx, j;
+                       struct stripe_head *sh2;
+
+                       sector_t bn = compute_blocknr(sh, i);
+                       sector_t s = raid5_compute_sector(bn, conf->raid_disks,
+                                               conf->raid_disks-1, &dd_idx,
+                                               &pd_idx, conf);
this bug made it through the regression test:

'conf->raid_disks-1' should be 'conf->raid_disks - conf->max_degraded'

--
Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux