On Wednesday November 8, [EMAIL PROTECTED] wrote:
> 
> Hi Neil!
> 
> I had to back out this patch from linux-2.4.0-test11-pre1
> because after a reboot resyncing my raid1 would stop at about 1.7%.
> After removing your patch resync is running fine.
> 

Oh dear.... (hides head in shame).

The problem is the following stanza.  The "bh" here is an upper-level
buffer_head, not a lower level buffer head, so it is correct to use
b_rsector, and wrong to use b_blocknr.
This only affects raid1 arrays that are under another virtual driver
such as raid0 or lvm.  Friedrich confirmed in separate mail that he
was using LVM.
Methinks I will go through raid[15].c and rename every "bh" to either
"mbh" (for master buffer head) or "sbh" (for slave buffer head) to
help avoid further confusion - but not before 2.4.0-final.

Linus, please reverse (patch -R -p0) this bit and accept my apologies.
The rest of the patch I have triple checked and is correct.

NeilBrown


--- ./drivers/md/raid1.c        2000/11/07 02:14:25     1.1
+++ ./drivers/md/raid1.c        2000/11/07 02:15:21     1.2
@@ -371,7 +374,7 @@
 {
        struct buffer_head *bh = r1_bh->master_bh;
 
-       io_request_done(bh->b_rsector, mddev_to_conf(r1_bh->mddev),
+       io_request_done(bh->b_blocknr*(bh->b_size>>9), mddev_to_conf(r1_bh->mddev),
                        test_bit(R1BH_SyncPhase, &r1_bh->state));
 
        bh->b_end_io(bh, uptodate);
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]

Reply via email to