diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2010-07-02 09:20:27 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2010-07-02 09:20:27 +0000 |
commit | cd6ccffddddc24f67b61d2155e9afd2c39e3463f (patch) | |
tree | ae54dd8c2e5ccdda545685105cba424be181d437 /sys/dev/softraidvar.h | |
parent | fc8a6fc3fb9a9b35949ff28904a728e25a77bbed (diff) |
Determine the data offset using a variable specified within the softraid
metadata. This allows us to implement seamless transitions from the
previous metadata version to the current version, avoiding the need to
recreate the softraid volume.
Joint work with marco@ during c2k10.
ok marco@
Diffstat (limited to 'sys/dev/softraidvar.h')
-rw-r--r-- | sys/dev/softraidvar.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/softraidvar.h b/sys/dev/softraidvar.h index e699954e69c..a4ba153a891 100644 --- a/sys/dev/softraidvar.h +++ b/sys/dev/softraidvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softraidvar.h,v 1.92 2010/04/18 16:57:48 jsing Exp $ */ +/* $OpenBSD: softraidvar.h,v 1.93 2010/07/02 09:20:26 jsing Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -26,6 +26,10 @@ #define SR_META_SIZE 64 /* save space at chunk beginning */ #define SR_META_OFFSET 16 /* skip 8192 bytes at chunk beginning */ +#define SR_META_V3_SIZE 64 +#define SR_META_V3_OFFSET 16 +#define SR_META_V3_DATA_OFFSET (SR_META_V3_OFFSET + SR_META_V3_SIZE) + #define SR_META_F_NATIVE 0 /* Native metadata format. */ #define SR_META_F_INVALID -1 @@ -82,7 +86,7 @@ struct sr_metadata { char ssd_devname[32];/* /dev/XXXXX */ u_int32_t ssd_meta_flags; #define SR_META_DIRTY 0x1 - u_int32_t ssd_pad; + u_int32_t ssd_data_offset; u_int64_t ssd_ondisk; /* on disk version counter */ int64_t ssd_rebuild; /* last block of rebuild */ } __packed; |