summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/softraid.c8
-rw-r--r--sys/dev/softraidvar.h5
2 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index a7f59492ea4..ccf7b23ee38 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.30 2007/04/22 00:06:09 marco Exp $ */
+/* $OpenBSD: softraid.c,v 1.31 2007/04/22 00:41:31 marco Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
*
@@ -1004,7 +1004,7 @@ sr_parse_chunks(struct sr_softc *sc, char *lst, struct sr_chunk_head *cl)
ss = name[strlen(name) - 1];
ch_entry->src_meta.scm_size =
label.d_partitions[ss - 'a'].p_size - SR_META_SIZE -
- SR_FFS_SKIP;
+ SR_META_OFFSET;
if (ch_entry->src_meta.scm_size <= 0) {
printf("%s: %s partition size = 0\n",
DEVNAME(sc), name);
@@ -1305,7 +1305,7 @@ sr_raid1_rw(struct sr_workunit *wu)
else
ios = sd->sd_vol.sv_meta.svm_no_chunk;
- blk += SR_META_SIZE + SR_FFS_SKIP;
+ blk += SR_META_SIZE + SR_META_OFFSET;
wu->swu_blk_start = blk;
wu->swu_blk_end = blk + xs->datalen - 1;
@@ -1853,7 +1853,7 @@ sr_save_metadata(struct sr_discipline *sd)
continue;
b.b_flags = B_WRITE;
- b.b_blkno = SR_FFS_SKIP; /* skip past mbr and partition table */
+ b.b_blkno = SR_META_OFFSET;
b.b_bcount = sz;
b.b_bufsize = sz;
b.b_resid = sz;
diff --git a/sys/dev/softraidvar.h b/sys/dev/softraidvar.h
index 9805c666b5a..524e2fb9692 100644
--- a/sys/dev/softraidvar.h
+++ b/sys/dev/softraidvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraidvar.h,v 1.12 2007/04/22 00:06:09 marco Exp $ */
+/* $OpenBSD: softraidvar.h,v 1.13 2007/04/22 00:41:31 marco Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <sro@peereboom.us>
*
@@ -20,7 +20,6 @@
#include <sys/buf.h>
#include <sys/queue.h>
#include <sys/rwlock.h>
-#include <ufs/ffs/fs.h>
#include <scsi/scsi_all.h>
#include <scsi/scsi_disk.h>
@@ -115,7 +114,7 @@ struct sr_workunit {
TAILQ_HEAD(sr_wu_list, sr_workunit);
#define SR_META_SIZE 32 /* save space at chunk beginning */
-#define SR_FFS_SKIP (SBLOCK_UFS1 >> 9)
+#define SR_META_OFFSET 16 /* skip 8192 bytes at chunk beginning */
#define SR_META_VERSION 2 /* bump when sr_metadata changes */
struct sr_metadata {
/* do not change order of ssd_magic, ssd_version */