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/softraid_raid0.c | |
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/softraid_raid0.c')
-rw-r--r-- | sys/dev/softraid_raid0.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/softraid_raid0.c b/sys/dev/softraid_raid0.c index 785b12e54ec..f8473a876e6 100644 --- a/sys/dev/softraid_raid0.c +++ b/sys/dev/softraid_raid0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid0.c,v 1.21 2010/07/01 19:31:04 thib Exp $ */ +/* $OpenBSD: softraid_raid0.c,v 1.22 2010/07/02 09:20:26 jsing Exp $ */ /* * Copyright (c) 2008 Marco Peereboom <marco@peereboom.us> * @@ -300,7 +300,8 @@ sr_raid0_rw(struct sr_workunit *wu) chunk = strip_no % no_chunk; stripoffs = lbaoffs & (strip_size - 1); chunkoffs = (strip_no / no_chunk) << strip_bits; - physoffs = chunkoffs + stripoffs + (SR_DATA_OFFSET << DEV_BSHIFT); + physoffs = chunkoffs + stripoffs + + (sd->sd_meta->ssd_data_offset << DEV_BSHIFT); length = MIN(xs->datalen, strip_size - stripoffs); leftover = xs->datalen; data = xs->data; |