diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2011-12-31 17:06:11 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2011-12-31 17:06:11 +0000 |
commit | 4a8ea1cbcedf1fd02dacfffb078d6933c8eb61e3 (patch) | |
tree | 2b86c5b03b517fd070199136059e3c58953c3472 /sys/dev/softraid.c | |
parent | de79dec21ccd7dff0b8ed379e3fbe8df199e4df6 (diff) |
Implement a concatenating discipline for softraid.
Many thanks to Marco Peereboom for his assistance with testing and
debugging. Thanks also to Josh Grosse and Chris Jackman for testing.
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index af5fa44f6e0..2f31fec9b16 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.262 2011/12/28 16:19:52 jsing Exp $ */ +/* $OpenBSD: softraid.c,v 1.263 2011/12/31 17:06:10 jsing Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -3094,7 +3094,8 @@ sr_ioctl_createraid(struct sr_softc *sc, struct bioc_createraid *bc, int user) DEVNAME(sc), sd->sd_meta->ssdi.ssd_size); /* Warn if we've wasted chunk space due to coercing. */ - if (sd->sd_vol.sv_chunk_minsz != sd->sd_vol.sv_chunk_maxsz) + if ((sd->sd_capabilities & SR_CAP_NON_COERCED) == 0 && + sd->sd_vol.sv_chunk_minsz != sd->sd_vol.sv_chunk_maxsz) printf("%s: chunk sizes are not equal; up to %llu " "blocks wasted per chunk\n", DEVNAME(sc), sd->sd_vol.sv_chunk_maxsz - @@ -3663,6 +3664,9 @@ sr_discipline_init(struct sr_discipline *sd, int level) sr_crypto_discipline_init(sd); break; #endif + case 'c': + sr_concat_discipline_init(sd); + break; default: goto bad; } |