summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_raid1.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2010-07-02 09:20:27 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2010-07-02 09:20:27 +0000
commitcd6ccffddddc24f67b61d2155e9afd2c39e3463f (patch)
treeae54dd8c2e5ccdda545685105cba424be181d437 /sys/dev/softraid_raid1.c
parentfc8a6fc3fb9a9b35949ff28904a728e25a77bbed (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/softraid_raid1.c')
-rw-r--r--sys/dev/softraid_raid1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c
index 0cd5b415f08..49cc61a3f2b 100644
--- a/sys/dev/softraid_raid1.c
+++ b/sys/dev/softraid_raid1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid1.c,v 1.24 2010/07/01 19:31:04 thib Exp $ */
+/* $OpenBSD: softraid_raid1.c,v 1.25 2010/07/02 09:20:26 jsing Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
*
@@ -381,7 +381,7 @@ sr_raid1_rw(struct sr_workunit *wu)
goto bad;
/* calculate physical block */
- blk += SR_DATA_OFFSET;
+ blk += sd->sd_meta->ssd_data_offset;
if (xs->flags & SCSI_DATA_IN)
ios = 1;