diff options
| author | 2013-03-31 11:12:06 +0000 | |
|---|---|---|
| committer | 2013-03-31 11:12:06 +0000 | |
| commit | fc627a5c7c1ac06c524fde49b452d96cf7c96cf0 (patch) | |
| tree | 20cdfecbe8bfae948ea0ebcfa2d59b599f1a89e8 /sys/dev/softraid_raid1.c | |
| parent | Pull the initialisation of runtime values out into a separate init (diff) | |
| download | wireguard-openbsd-fc627a5c7c1ac06c524fde49b452d96cf7c96cf0.tar.xz wireguard-openbsd-fc627a5c7c1ac06c524fde49b452d96cf7c96cf0.zip | |
Provide default resource allocation and free functions. Convert all
disciplines except for AOE and CRYPTO, which require custom handlers.
Diffstat (limited to 'sys/dev/softraid_raid1.c')
| -rw-r--r-- | sys/dev/softraid_raid1.c | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c index 48776e14a96..48942ab8548 100644 --- a/sys/dev/softraid_raid1.c +++ b/sys/dev/softraid_raid1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid1.c,v 1.46 2013/03/29 15:26:45 jsing Exp $ */ +/* $OpenBSD: softraid_raid1.c,v 1.47 2013/03/31 11:12:06 jsing Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -48,8 +48,6 @@ int sr_raid1_create(struct sr_discipline *, struct bioc_createraid *, int, int64_t); int sr_raid1_assemble(struct sr_discipline *, struct bioc_createraid *, int, void *); -int sr_raid1_alloc_resources(struct sr_discipline *); -int sr_raid1_free_resources(struct sr_discipline *); int sr_raid1_rw(struct sr_workunit *); void sr_raid1_intr(struct buf *); void sr_raid1_set_chunk_state(struct sr_discipline *, int, int); @@ -67,10 +65,8 @@ sr_raid1_discipline_init(struct sr_discipline *sd) sd->sd_max_wu = SR_RAID1_NOWU; /* Setup discipline specific function pointers. */ - sd->sd_alloc_resources = sr_raid1_alloc_resources; sd->sd_assemble = sr_raid1_assemble; sd->sd_create = sr_raid1_create; - sd->sd_free_resources = sr_raid1_free_resources; sd->sd_scsi_rw = sr_raid1_rw; sd->sd_scsi_intr = sr_raid1_intr; sd->sd_set_chunk_state = sr_raid1_set_chunk_state; @@ -104,39 +100,6 @@ sr_raid1_assemble(struct sr_discipline *sd, struct bioc_createraid *bc, return 0; } -int -sr_raid1_alloc_resources(struct sr_discipline *sd) -{ - int rv = EINVAL; - - DNPRINTF(SR_D_DIS, "%s: sr_raid1_alloc_resources\n", - DEVNAME(sd->sd_sc)); - - if (sr_wu_alloc(sd)) - goto bad; - if (sr_ccb_alloc(sd)) - goto bad; - - rv = 0; -bad: - return (rv); -} - -int -sr_raid1_free_resources(struct sr_discipline *sd) -{ - int rv = EINVAL; - - DNPRINTF(SR_D_DIS, "%s: sr_raid1_free_resources\n", - DEVNAME(sd->sd_sc)); - - sr_wu_free(sd); - sr_ccb_free(sd); - - rv = 0; - return (rv); -} - void sr_raid1_set_chunk_state(struct sr_discipline *sd, int c, int new_state) { |
