diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2011-09-19 21:39:32 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2011-09-19 21:39:32 +0000 |
commit | 0a8196486fe7e0fd56f376478e5d4d73dbbed5b3 (patch) | |
tree | a785bb58a7f649ee02f2f6950bc64c13c45a1899 /sys/dev/softraidvar.h | |
parent | 2561a1cebf7b9f0fd158caf2b4c26fd662adc3b1 (diff) |
When installboot is run on a softraid volume, add boot optional metadata
to store the DUID of the softraid volume and each of the chunks that it
is assembled from. This allows us to correctly identify the root disk.
ok deraadt@
Diffstat (limited to 'sys/dev/softraidvar.h')
-rw-r--r-- | sys/dev/softraidvar.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/softraidvar.h b/sys/dev/softraidvar.h index a53f55adada..63d64a9231a 100644 --- a/sys/dev/softraidvar.h +++ b/sys/dev/softraidvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softraidvar.h,v 1.108 2011/09/18 19:40:49 jsing Exp $ */ +/* $OpenBSD: softraidvar.h,v 1.109 2011/09/19 21:39:31 jsing Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -174,11 +174,13 @@ struct sr_meta_crypto { #define chk_hmac_sha1 _scm_chk.chk_hmac_sha1 } __packed; +#define SR_MAX_BOOT_DISKS 16 struct sr_meta_boot { struct sr_meta_opt_hdr sbm_hdr; - u_int64_t sbm_root_uid; u_int32_t sbm_bootblk_size; u_int32_t sbm_bootldr_size; + u_char sbm_root_duid[8]; + u_char sbm_boot_duid[SR_MAX_BOOT_DISKS][8]; } __packed; struct sr_meta_keydisk { @@ -451,6 +453,7 @@ struct sr_chunk { /* helper members before metadata makes it onto the chunk */ int src_meta_ondisk;/* set when meta is on disk */ char src_devname[32]; + u_char src_duid[8]; /* Chunk disklabel UID. */ int64_t src_size; /* in blocks */ SLIST_ENTRY(sr_chunk) src_link; |