diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2007-05-28 21:54:27 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2007-05-28 21:54:27 +0000 |
commit | f9d5dd59fac138e2871d535e050b26f89aed3b78 (patch) | |
tree | e64d707e4b4a2d1d1b6396317d5e38d0be8e8fb6 /sys/dev/softraidvar.h | |
parent | 3561557542a91f2763cb6350bae4709e565c845c (diff) |
Make disk assembly smarter and add two qualifiers to it:
1) noautoassemble; when set the softraid volume will not be assembled during
autoconf.
2) force; when set it will overwrite metadata on disk
While writing this I ran into 3 bugs that were fixed along the way
1) bcopy in sr_read_meta was copying data to the wrong pointer
2) in sr_read_meta the wrong metadata was coppied into the chunk
3) sr_free_discipline was freing a pointer that wasn't malloc'd
ok dlg
Diffstat (limited to 'sys/dev/softraidvar.h')
-rw-r--r-- | sys/dev/softraidvar.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/softraidvar.h b/sys/dev/softraidvar.h index 60371bc3854..94852056be2 100644 --- a/sys/dev/softraidvar.h +++ b/sys/dev/softraidvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softraidvar.h,v 1.20 2007/05/26 14:30:26 marco Exp $ */ +/* $OpenBSD: softraidvar.h,v 1.21 2007/05/28 21:54:26 marco Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <sro@peereboom.us> * @@ -121,7 +121,8 @@ struct sr_metadata { u_int64_t ssd_magic; /* magic id */ #define SR_MAGIC 0x4d4152436372616dllu u_int8_t ssd_version; /* meta data version */ - u_int8_t ssd_pad1[7]; + u_int8_t ssd_pad1[3]; + u_int32_t ssd_flags; /* flags */ /* meta-data */ u_int32_t ssd_checksum; /* xor of the structure */ @@ -234,6 +235,7 @@ struct sr_discipline { /* discipline metadata */ struct sr_metadata *sd_meta; /* in memory copy of metadata */ + u_int32_t sd_meta_flags; /* discipline volume */ struct sr_volume sd_vol; /* volume associated */ |