diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-04-12 16:26:55 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-04-12 16:26:55 +0000 |
commit | aa13ac29aeacd0af61b6bf44a645640c24ecd9d0 (patch) | |
tree | 89a68b684311e9e34ff7821378e1876f00c1a919 /sys/dev/softraid_raid6.c | |
parent | 5644c29d8c22c901acbc4b8cedc4f69bd5060f7e (diff) |
No need to rescan chunks in each discipline to find appropriate
volume sector size. Determine volume sector size in sr_meta_init().
Pointed out, tweaked and ok jsing@
Diffstat (limited to 'sys/dev/softraid_raid6.c')
-rw-r--r-- | sys/dev/softraid_raid6.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/dev/softraid_raid6.c b/sys/dev/softraid_raid6.c index 62f124f80c9..14eb9f98369 100644 --- a/sys/dev/softraid_raid6.c +++ b/sys/dev/softraid_raid6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid6.c,v 1.70 2016/04/04 18:48:39 krw Exp $ */ +/* $OpenBSD: softraid_raid6.c,v 1.71 2016/04/12 16:26:54 krw Exp $ */ /* * Copyright (c) 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org> @@ -112,22 +112,12 @@ int sr_raid6_create(struct sr_discipline *sd, struct bioc_createraid *bc, int no_chunk, int64_t coerced_size) { - int i; - u_int32_t secsize; - if (no_chunk < 4) { sr_error(sd->sd_sc, "%s requires four or more chunks", sd->sd_name); return EINVAL; } - secsize = 0; - for (i = 0; i < no_chunk; i++) { - if (sd->sd_vol.sv_chunks[i]->src_secsize > secsize) - secsize = sd->sd_vol.sv_chunks[i]->src_secsize; - } - sd->sd_meta->ssdi.ssd_secsize = secsize; - /* * XXX add variable strip size later even though MAXPHYS is really * the clever value, users like * to tinker with that type of stuff. |