diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2010-03-26 11:20:35 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2010-03-26 11:20:35 +0000 |
commit | 4cdc1608fbd291f04585f5723b81be1d88ce479c (patch) | |
tree | 3e8b36884e6a3469a535ff798ce6d892467520f4 /sys/dev/softraid_raid6.c | |
parent | 45fb961144283938ed9a1de5232a62d70fe0b55d (diff) |
Add storage for the boot block and boot loader to the softraid metadata.
Also add a new optional metadata type for boot data. This is the first
step (of many) towards being able to boot from softraid volumes.
WARNING: This version of the softraid metadata is not compatible with
previous versions. As a result, any softraid volumes created with older
kernels will not assemble. Data on existing softraid volumes should be
backed up before upgrading. The volume should then be recreated and the
data restored.
ok marco@
Diffstat (limited to 'sys/dev/softraid_raid6.c')
-rw-r--r-- | sys/dev/softraid_raid6.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/softraid_raid6.c b/sys/dev/softraid_raid6.c index bcfa69f8d6a..a6e68c21a78 100644 --- a/sys/dev/softraid_raid6.c +++ b/sys/dev/softraid_raid6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid6.c,v 1.15 2010/02/09 01:18:05 jordan Exp $ */ +/* $OpenBSD: softraid_raid6.c,v 1.16 2010/03/26 11:20:34 jsing Exp $ */ /* * Copyright (c) 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org> @@ -490,8 +490,8 @@ sr_raid6_rw(struct sr_workunit *wu) strip_no = lbaoffs >> strip_bits; strip_offs = lbaoffs & (strip_size - 1); chunk_offs = (strip_no / no_chunk) << strip_bits; - phys_offs = chunk_offs + strip_offs + - ((SR_META_OFFSET + SR_META_SIZE) << DEV_BSHIFT); + phys_offs = chunk_offs + strip_offs + + (SR_DATA_OFFSET << DEV_BSHIFT); /* get size remaining in this stripe */ length = MIN(strip_size - strip_offs, datalen); |