diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2007-04-23 17:06:11 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2007-04-23 17:06:11 +0000 |
commit | 950db5fde12b6262c40526587a5afb3c8205df87 (patch) | |
tree | 1a4145cb42da20200ed22360cc4f3f75efe25c88 /sys/dev/softraid.c | |
parent | 4438d4621510a779f157b6cd49520165728156c1 (diff) |
Keep track of coerced chunk sizes.
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index cf59de8eb64..6a451964d5d 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.33 2007/04/22 13:02:56 marco Exp $ */ +/* $OpenBSD: softraid.c,v 1.34 2007/04/23 17:06:10 marco Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -54,7 +54,7 @@ uint32_t sr_debug = 0 /* | SR_D_IOCTL */ /* | SR_D_CCB */ /* | SR_D_WU */ - | SR_D_META + /* | SR_D_META */ /* | SR_D_DIS */ /* | SR_D_STATE */ ; @@ -752,10 +752,12 @@ sr_ioctl_createraid(struct sr_softc *sc, struct bioc_createraid *bc) if (ch_entry->src_meta.scm_size < min_chunk_sz) min_chunk_sz = ch_entry->src_meta.scm_size; } + SLIST_FOREACH(ch_entry, cl, src_link) + ch_entry->src_meta.scm_coerced_size = min_chunk_sz; /* whine if chunks are not the same size */ if (min_chunk_sz != max_chunk_sz) - printf("%s: chunk sizes are not equal. Wasted blocks per " - "chunk: %llu\n", + printf("%s: chunk sizes are not equal; up to %llu blocks " + "wasted per chunk\n", DEVNAME(sc), max_chunk_sz - min_chunk_sz); switch (bc->bc_level) { @@ -770,8 +772,6 @@ sr_ioctl_createraid(struct sr_softc *sc, struct bioc_createraid *bc) strlcpy(sd->sd_name, "RAID 1", sizeof(sd->sd_name)); vol_size = min_chunk_sz; - /* XXX coerce all chunks here */ - /* setup pointers */ sd->sd_alloc_resources = sr_raid1_alloc_resources; sd->sd_free_resources = sr_raid1_free_resources; |