From 68690c5ee08805c2ddd1cd76b913d23c4bc7ccd3 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Tue, 29 Jul 2008 01:18:03 +0000 Subject: Add rebuild mark so that we can restart a rebuild upon clean shutdown. Fix a typo while here. The rebuild field was appended to the metadata so that we can automatically update from v2 to v3. The only visible difference will be that in the dmesg the SCSI version number will go from 002 to 003. ok deraad. --- sys/dev/softraidvar.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/dev/softraidvar.h') diff --git a/sys/dev/softraidvar.h b/sys/dev/softraidvar.h index 6af7eb14268..20e77ab5e8c 100644 --- a/sys/dev/softraidvar.h +++ b/sys/dev/softraidvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softraidvar.h,v 1.62 2008/07/20 21:57:51 djm Exp $ */ +/* $OpenBSD: softraidvar.h,v 1.63 2008/07/29 01:18:02 marco Exp $ */ /* * Copyright (c) 2006 Marco Peereboom * Copyright (c) 2008 Chris Kuethe @@ -28,7 +28,7 @@ struct sr_uuid { #define SR_META_SIZE 64 /* save space at chunk beginning */ #define SR_META_OFFSET 16 /* skip 8192 bytes at chunk beginning */ -#define SR_META_VERSION 2 /* bump when sr_metadata changes */ +#define SR_META_VERSION 3 /* bump when sr_metadata changes */ struct sr_metadata { struct sr_meta_invariant { /* do not change order of ssd_magic, ssd_version */ @@ -43,7 +43,7 @@ struct sr_metadata { u_int32_t ssd_chunk_id; /* chunk identifier */ /* optional */ - u_int32_t ssd_opt_no; /* nr of optional md * elements */ + u_int32_t ssd_opt_no; /* nr of optional md elements */ u_int32_t ssd_pad; /* volume metadata */ @@ -64,6 +64,7 @@ struct sr_metadata { #define SR_META_DIRTY 0x1 u_int32_t ssd_pad; u_int64_t ssd_ondisk; /* on disk version counter */ + int64_t ssd_rebuild; /* last block of rebuild */ } __packed; struct sr_meta_chunk { -- cgit v1.2.3