diff options
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index e0a57d5e918..b83bfc495be 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.195 2010/03/23 01:57:19 krw Exp $ */ +/* $OpenBSD: softraid.c,v 1.196 2010/03/26 11:20:34 jsing Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -1341,8 +1341,7 @@ sr_meta_native_probe(struct sr_softc *sc, struct sr_chunk *ch_entry) goto unwind; } - size = DL_GETPSIZE(&label.d_partitions[part]) - - SR_META_SIZE - SR_META_OFFSET; + size = DL_GETPSIZE(&label.d_partitions[part]) - SR_DATA_OFFSET; if (size <= 0) { DNPRINTF(SR_D_META, "%s: %s partition too small\n", DEVNAME(sc), devname); @@ -2351,8 +2350,7 @@ sr_hotspare(struct sr_softc *sc, dev_t dev) } /* Calculate partition size. */ - size = DL_GETPSIZE(&label.d_partitions[part]) - - SR_META_SIZE - SR_META_OFFSET; + size = DL_GETPSIZE(&label.d_partitions[part]) - SR_DATA_OFFSET; /* * Create and populate chunk metadata. @@ -2646,8 +2644,7 @@ sr_rebuild_init(struct sr_discipline *sd, dev_t dev, int hotspare) } /* is partition large enough? */ - size = DL_GETPSIZE(&label.d_partitions[part]) - - SR_META_SIZE - SR_META_OFFSET; + size = DL_GETPSIZE(&label.d_partitions[part]) - SR_DATA_OFFSET; if (size < csize) { printf("%s: partition too small, at least %llu B required\n", DEVNAME(sc), csize << DEV_BSHIFT); |