summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-01-18 09:01:01 +0000
committerjsing <jsing@openbsd.org>2014-01-18 09:01:01 +0000
commit0db2cd3920034c5cf97c92f4fdef248ade54fbcd (patch)
treeab78b973ffda96b81a09d9c247fc554433dcaa43
parentCope with slightly broken NAME sections in man(7) pages (diff)
downloadwireguard-openbsd-0db2cd3920034c5cf97c92f4fdef248ade54fbcd.tar.xz
wireguard-openbsd-0db2cd3920034c5cf97c92f4fdef248ade54fbcd.zip
Remove the RAID 4 discipline from softraid. Anyone sensible would use RAID
5 instead of RAID 4, assuming both were functional. Discussed with krw@
-rw-r--r--sbin/bioctl/bioctl.c3
-rw-r--r--share/man/man4/softraid.416
-rw-r--r--sys/dev/softraid.c5
-rw-r--r--sys/dev/softraid_raidp.c27
-rw-r--r--sys/dev/softraidvar.h4
5 files changed, 16 insertions, 39 deletions
diff --git a/sbin/bioctl/bioctl.c b/sbin/bioctl/bioctl.c
index 8acfa61be6a..fa6784f753a 100644
--- a/sbin/bioctl/bioctl.c
+++ b/sbin/bioctl/bioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bioctl.c,v 1.117 2013/11/22 04:12:46 deraadt Exp $ */
+/* $OpenBSD: bioctl.c,v 1.118 2014/01/18 09:01:01 jsing Exp $ */
/*
* Copyright (c) 2004, 2005 Marco Peereboom
@@ -851,7 +851,6 @@ bio_createraid(u_int16_t level, char *dev_list, char *key_disk)
case 1:
min_disks = 2;
break;
- case 4:
case 5:
min_disks = 3;
break;
diff --git a/share/man/man4/softraid.4 b/share/man/man4/softraid.4
index 7940df7e082..e6b592c3fdf 100644
--- a/share/man/man4/softraid.4
+++ b/share/man/man4/softraid.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: softraid.4,v 1.33 2013/10/31 17:54:57 stsp Exp $
+.\" $OpenBSD: softraid.4,v 1.34 2014/01/18 09:01:01 jsing Exp $
.\"
.\" Copyright (c) 2007 Todd T. Fries <todd@OpenBSD.org>
.\" Copyright (c) 2007 Marco Peereboom <marco@OpenBSD.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 31 2013 $
+.Dd $Mdocdate: January 18 2014 $
.Dt SOFTRAID 4
.Os
.Sh NAME
@@ -78,14 +78,6 @@ though at the cost of write speed.
Unlike traditional RAID 1,
.Nm
supports the use of more than two chunks in a RAID 1 setup.
-.It RAID 4
-A striping discipline with a
-.Em fixed parity
-chunk.
-It stripes data across chunks and provides parity to prevent data loss of
-a single chunk failure.
-Read performance is increased,
-though write performance is limited by the parity chunk.
.It RAID 5
A striping discipline with
.Em floating parity
@@ -93,7 +85,7 @@ across all chunks.
It stripes data across chunks and provides parity to prevent data loss of
a single chunk failure.
Read performance is increased;
-write performance should be faster than RAID 4.
+write performance does incur additional overhead.
.It CRYPTO
An
.Em encrypting
@@ -203,7 +195,7 @@ The RAID 1 discipline does not initialize the mirror upon creation.
This is by design because all sectors that are read are written first.
There is no point in wasting a lot of time syncing random data.
.Pp
-The RAID 4 and 5 disciplines do not initialize the parity upon creation.
+The RAID 5 discipline do not initialize the parity upon creation.
This is due to the scrub functionality not being currently implemented.
.Pp
Currently there is no automated mechanism to recover from failed disks.
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index f876d755087..47008bb057b 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.315 2014/01/05 15:03:57 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.316 2014/01/18 09:01:01 jsing Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -3938,9 +3938,6 @@ sr_discipline_init(struct sr_discipline *sd, int level)
case 1:
sr_raid1_discipline_init(sd);
break;
- case 4:
- sr_raidp_discipline_init(sd, SR_MD_RAID4);
- break;
case 5:
sr_raidp_discipline_init(sd, SR_MD_RAID5);
break;
diff --git a/sys/dev/softraid_raidp.c b/sys/dev/softraid_raidp.c
index 41b326d5895..2e548e234a1 100644
--- a/sys/dev/softraid_raidp.c
+++ b/sys/dev/softraid_raidp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raidp.c,v 1.55 2013/11/21 17:06:45 krw Exp $ */
+/* $OpenBSD: softraid_raidp.c,v 1.56 2014/01/18 09:01:01 jsing Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
@@ -73,10 +73,7 @@ sr_raidp_discipline_init(struct sr_discipline *sd, u_int8_t type)
{
/* Fill out discipline members. */
sd->sd_type = type;
- if (sd->sd_type == SR_MD_RAID4)
- strlcpy(sd->sd_name, "RAID 4", sizeof(sd->sd_name));
- else
- strlcpy(sd->sd_name, "RAID 5", sizeof(sd->sd_name));
+ strlcpy(sd->sd_name, "RAID 5", sizeof(sd->sd_name));
sd->sd_capabilities = SR_CAP_SYSTEM_DISK | SR_CAP_AUTO_ASSEMBLE |
SR_CAP_REDUNDANT;
sd->sd_max_ccb_per_wu = 4; /* only if stripsize <= MAXPHYS */
@@ -380,15 +377,11 @@ sr_raidp_rw(struct sr_workunit *wu)
/* map disk offset to parity/data drive */
chunk = strip_no % no_chunk;
- if (sd->sd_type == SR_MD_RAID4)
- parity = no_chunk; /* RAID4: Parity is always drive N */
- else {
- /* RAID5: left asymmetric algorithm */
- parity = no_chunk - ((strip_no / no_chunk) %
- (no_chunk + 1));
- if (chunk >= parity)
- chunk++;
- }
+
+ /* RAID5 - left asymmetric algorithm */
+ parity = no_chunk - ((strip_no / no_chunk) % (no_chunk + 1));
+ if (chunk >= parity)
+ chunk++;
lba = phys_offs >> DEV_BSHIFT;
@@ -649,11 +642,7 @@ sr_raidp_scrub(struct sr_discipline *sd)
max_strip = sd->sd_meta->ssdi.ssd_size >> strip_bits;
for (strip_no = 0; strip_no < max_strip; strip_no++) {
- if (sd->sd_type == SR_MD_RAID4)
- parity = no_chunk;
- else
- parity = no_chunk - ((strip_no / no_chunk) %
- (no_chunk + 1));
+ parity = no_chunk - ((strip_no / no_chunk) % (no_chunk + 1));
xorbuf = sr_get_block(sd, strip_size);
for (i = 0; i <= no_chunk; i++) {
diff --git a/sys/dev/softraidvar.h b/sys/dev/softraidvar.h
index 8d46185c905..c0dfac8cad1 100644
--- a/sys/dev/softraidvar.h
+++ b/sys/dev/softraidvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraidvar.h,v 1.141 2014/01/18 08:49:20 jsing Exp $ */
+/* $OpenBSD: softraidvar.h,v 1.142 2014/01/18 09:01:01 jsing Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -509,7 +509,7 @@ struct sr_discipline {
#define SR_MD_CRYPTO 4
#define SR_MD_AOE_INIT 5
#define SR_MD_AOE_TARG 6
-#define SR_MD_RAID4 7
+ /* SR_MD_RAID4 was 7. */
#define SR_MD_RAID6 8
#define SR_MD_CONCAT 9
char sd_name[10]; /* human readable dis name */