diff options
| author | Søren Schmidt <sos@FreeBSD.org> | 2003-09-08 13:36:26 +0000 |
|---|---|---|
| committer | Søren Schmidt <sos@FreeBSD.org> | 2003-09-08 13:36:26 +0000 |
| commit | df63f1d98822781359e2855706e94b4cec330178 (patch) | |
| tree | 12dc06a5af29812212de48d23978bd5b709a8606 /sys/dev/ata/ata-raid.c | |
| parent | 9e05721545d218088cce9f31b6b57ff0563fb22c (diff) | |
Notes
Diffstat (limited to 'sys/dev/ata/ata-raid.c')
| -rw-r--r-- | sys/dev/ata/ata-raid.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ata/ata-raid.c b/sys/dev/ata/ata-raid.c index 8477db026cc7..7293cc117f63 100644 --- a/sys/dev/ata/ata-raid.c +++ b/sys/dev/ata/ata-raid.c @@ -75,6 +75,8 @@ static void ar_print_conf(struct ar_softc *); static struct ar_softc **ar_table = NULL; static MALLOC_DEFINE(M_AR, "AR driver", "ATA RAID driver"); +#define AR_REBUILD_SIZE 128 + int ata_raiddisk_attach(struct ad_softc *adp) { @@ -1008,14 +1010,15 @@ ar_rebuild(void *arg) /* setup start conditions */ s = splbio(); rdp->lock_start = 0; - rdp->lock_end = rdp->lock_start + 256; + rdp->lock_end = rdp->lock_start + AR_REBUILD_SIZE; rdp->flags |= AR_F_REBUILDING; splx(s); - buffer = malloc(256 * DEV_BSIZE, M_AR, M_NOWAIT | M_ZERO); + buffer = malloc(AR_REBUILD_SIZE * DEV_BSIZE, M_AR, M_NOWAIT | M_ZERO); /* now go copy entire disk(s) */ while (rdp->lock_end < (rdp->total_sectors / rdp->width)) { - int size = min(256, (rdp->total_sectors / rdp->width) - rdp->lock_end); + int size = min(AR_REBUILD_SIZE, + (rdp->total_sectors / rdp->width) - rdp->lock_end); for (disk = 0; disk < rdp->width; disk++) { struct ad_softc *adp; |
