diff options
author | sos <sos@FreeBSD.org> | 2002-03-03 16:36:19 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2002-03-03 16:36:19 +0000 |
commit | d3537063e702483a45be5539996bdbc5578a529a (patch) | |
tree | 71ea9866a8cbb80e1f6e1f08365f6500ae250f29 /sys/dev/ata/ata-raid.c | |
parent | 44996749580c26d0836ef5d373396e9432a43af5 (diff) | |
download | FreeBSD-src-d3537063e702483a45be5539996bdbc5578a529a.zip FreeBSD-src-d3537063e702483a45be5539996bdbc5578a529a.tar.gz |
Forgot this litte patch, scale the individual disk size from the
arrays total size depending on width of the array.
Diffstat (limited to 'sys/dev/ata/ata-raid.c')
-rw-r--r-- | sys/dev/ata/ata-raid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ata/ata-raid.c b/sys/dev/ata/ata-raid.c index 7a0f63f..2a3f89f 100644 --- a/sys/dev/ata/ata-raid.c +++ b/sys/dev/ata/ata-raid.c @@ -591,7 +591,7 @@ ar_rebuild(struct ar_softc *rdp) buffer = malloc(256 * DEV_BSIZE, M_AR, M_NOWAIT | M_ZERO); /* now go copy entire disk(s) */ - while (rdp->lock_start < rdp->total_sectors) { + while (rdp->lock_start < (rdp->total_sectors / rdp->width)) { for (disk = 0; disk < rdp->width; disk++) { if (((rdp->disks[disk].flags & AR_DF_ONLINE) && (rdp->disks[disk + rdp->width].flags & AR_DF_ONLINE)) || @@ -615,8 +615,8 @@ ar_rebuild(struct ar_softc *rdp) 256 * DEV_BSIZE, buffer, AR_WRITE | AR_WAIT); } rdp->lock_start = rdp->lock_end; - rdp->lock_end = - rdp->lock_start + min(256, rdp->total_sectors - rdp->lock_end); + rdp->lock_end = rdp->lock_start + + min(256, (rdp->total_sectors / rdp->width) - rdp->lock_end); wakeup(rdp); } free(buffer, M_AR); |