summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_raidp.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_raidp.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_raidp.c')
-rw-r--r--sys/dev/softraid_raidp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/softraid_raidp.c b/sys/dev/softraid_raidp.c
index 8b9a7a1235a..562003445b6 100644
--- a/sys/dev/softraid_raidp.c
+++ b/sys/dev/softraid_raidp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raidp.c,v 1.17 2010/07/01 19:31:04 thib Exp $ */
+/* $OpenBSD: softraid_raidp.c,v 1.18 2010/07/02 09:20:26 jsing Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
@@ -407,7 +407,7 @@ sr_raidp_rw(struct sr_workunit *wu)
strip_offs = lbaoffs & (strip_size - 1);
chunk_offs = (strip_no / no_chunk) << strip_bits;
phys_offs = chunk_offs + strip_offs +
- (SR_DATA_OFFSET << DEV_BSHIFT);
+ (sd->sd_meta->ssd_data_offset << DEV_BSHIFT);
/* get size remaining in this stripe */
length = MIN(strip_size - strip_offs, datalen);