diff options
author | 2014-01-18 09:33:53 +0000 | |
---|---|---|
committer | 2014-01-18 09:33:53 +0000 | |
commit | 4c26ac155e757cc4c0be7091806d8e8a6a874eb2 (patch) | |
tree | 6ba3926d098444f932808244b3e303f907226f8d /sys/dev/softraid.c | |
parent | Rename softraid RAIDP to softraid RAID5. (diff) | |
download | wireguard-openbsd-4c26ac155e757cc4c0be7091806d8e8a6a874eb2.tar.xz wireguard-openbsd-4c26ac155e757cc4c0be7091806d8e8a6a874eb2.zip |
Move the block get/put routines into the common code, instead of having
RAID 6 borrow them from RAID 5.
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 3cafbf392f4..a853d43f72b 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.317 2014/01/18 09:23:26 jsing Exp $ */ +/* $OpenBSD: softraid.c,v 1.318 2014/01/18 09:33:53 jsing Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -4382,6 +4382,18 @@ die: sd->sd_vol_status = new_state; } +void * +sr_block_get(struct sr_discipline *sd, int length) +{ + return dma_alloc(length, PR_NOWAIT | PR_ZERO); +} + +void +sr_block_put(struct sr_discipline *sd, void *ptr, int length) +{ + dma_free(ptr, length); +} + void sr_checksum_print(u_int8_t *md5) { |