diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2011-04-06 02:35:52 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2011-04-06 02:35:52 +0000 |
commit | f986fa988eccfa03e7d275d1b17cb432af7a46df (patch) | |
tree | 0dedbe15a4910e83c5b74d24c148e8ea5cbd2ee6 /sys/dev/softraid.c | |
parent | c06861e0bd84e3c3cd49b2962f1ce3f5cf7c1f4a (diff) |
make rebuild also work in bigmem
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 86bd2f1e038..c219740ee05 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.224 2011/04/06 02:00:10 marco Exp $ */ +/* $OpenBSD: softraid.c,v 1.225 2011/04/06 02:35:51 marco Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -3934,7 +3934,8 @@ sr_rebuild_thread(void *arg) sd->sd_reb_active = 1; - buf = malloc(SR_REBUILD_IO_SIZE << DEV_BSHIFT, M_DEVBUF, M_WAITOK); + /* currently this is 64k therefore we can use dma_alloc */ + buf = dma_alloc(SR_REBUILD_IO_SIZE << DEV_BSHIFT, PR_WAITOK); for (blk = restart; blk <= whole_blk; blk++) { if (blk == whole_blk) sz = partial_blk; @@ -4053,7 +4054,7 @@ abort: printf("%s: could not save metadata to %s\n", DEVNAME(sc), sd->sd_meta->ssd_devname); fail: - free(buf, M_DEVBUF); + dma_free(buf, SR_REBUILD_IO_SIZE << DEV_BSHIFT); sd->sd_reb_active = 0; kthread_exit(0); } |