diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2013-01-16 07:06:30 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2013-01-16 07:06:30 +0000 |
commit | e83fb3124c5c7fd94fb17e3f0ace2db782c2a1cd (patch) | |
tree | 64109bf85af14fe88cdb2639866b80cc6f54f9e2 /sys | |
parent | e49d6153378445e33f52e36468ef7885ab1b56ce (diff) |
Add a new capability flag to identify disciplines where read failures are
not necessarily terminal (i.e. we have redundancy).
ok krw@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/softraid_raid1.c | 4 | ||||
-rw-r--r-- | sys/dev/softraid_raid6.c | 5 | ||||
-rw-r--r-- | sys/dev/softraid_raidp.c | 5 | ||||
-rw-r--r-- | sys/dev/softraidvar.h | 3 |
4 files changed, 10 insertions, 7 deletions
diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c index 8cb0b3b0d9e..2393620383f 100644 --- a/sys/dev/softraid_raid1.c +++ b/sys/dev/softraid_raid1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid1.c,v 1.36 2013/01/16 06:42:22 jsing Exp $ */ +/* $OpenBSD: softraid_raid1.c,v 1.37 2013/01/16 07:06:29 jsing Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -64,7 +64,7 @@ sr_raid1_discipline_init(struct sr_discipline *sd) sd->sd_type = SR_MD_RAID1; strlcpy(sd->sd_name, "RAID 1", sizeof(sd->sd_name)); sd->sd_capabilities = SR_CAP_SYSTEM_DISK | SR_CAP_AUTO_ASSEMBLE | - SR_CAP_REBUILD; + SR_CAP_REBUILD | SR_CAP_REDUNDANT; sd->sd_max_wu = SR_RAID1_NOWU; /* Setup discipline specific function pointers. */ diff --git a/sys/dev/softraid_raid6.c b/sys/dev/softraid_raid6.c index 33f7c7f56d6..6279a3069f5 100644 --- a/sys/dev/softraid_raid6.c +++ b/sys/dev/softraid_raid6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid6.c,v 1.31 2013/01/16 06:42:22 jsing Exp $ */ +/* $OpenBSD: softraid_raid6.c,v 1.32 2013/01/16 07:06:29 jsing Exp $ */ /* * Copyright (c) 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org> @@ -100,7 +100,8 @@ sr_raid6_discipline_init(struct sr_discipline *sd) /* Fill out discipline members. */ sd->sd_type = SR_MD_RAID6; strlcpy(sd->sd_name, "RAID 6", sizeof(sd->sd_name)); - sd->sd_capabilities = SR_CAP_SYSTEM_DISK | SR_CAP_AUTO_ASSEMBLE; + sd->sd_capabilities = SR_CAP_SYSTEM_DISK | SR_CAP_AUTO_ASSEMBLE | + SR_CAP_REDUNDANT; sd->sd_max_wu = SR_RAID6_NOWU; /* Setup discipline specific function pointers. */ diff --git a/sys/dev/softraid_raidp.c b/sys/dev/softraid_raidp.c index 0615d7bb06e..bb5130ef51f 100644 --- a/sys/dev/softraid_raidp.c +++ b/sys/dev/softraid_raidp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raidp.c,v 1.28 2013/01/16 06:42:22 jsing Exp $ */ +/* $OpenBSD: softraid_raidp.c,v 1.29 2013/01/16 07:06:29 jsing Exp $ */ /* * Copyright (c) 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org> @@ -77,7 +77,8 @@ sr_raidp_discipline_init(struct sr_discipline *sd, u_int8_t type) strlcpy(sd->sd_name, "RAID 4", sizeof(sd->sd_name)); else strlcpy(sd->sd_name, "RAID 5", sizeof(sd->sd_name)); - sd->sd_capabilities = SR_CAP_SYSTEM_DISK | SR_CAP_AUTO_ASSEMBLE; + 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 */ sd->sd_max_wu = SR_RAIDP_NOWU; diff --git a/sys/dev/softraidvar.h b/sys/dev/softraidvar.h index 2b12c240046..c53e79c4e3a 100644 --- a/sys/dev/softraidvar.h +++ b/sys/dev/softraidvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softraidvar.h,v 1.123 2013/01/16 06:29:14 jsing Exp $ */ +/* $OpenBSD: softraidvar.h,v 1.124 2013/01/16 07:06:29 jsing Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -519,6 +519,7 @@ struct sr_discipline { #define SR_CAP_AUTO_ASSEMBLE 0x00000002 /* Can auto assemble. */ #define SR_CAP_REBUILD 0x00000004 /* Supports rebuild. */ #define SR_CAP_NON_COERCED 0x00000008 /* Uses non-coerced size. */ +#define SR_CAP_REDUNDANT 0x00000010 /* Redundant copies of data. */ union { struct sr_raid0 mdd_raid0; |