summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid_raid6.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2015-07-19 17:04:31 +0000
committerkrw <krw@openbsd.org>2015-07-19 17:04:31 +0000
commitbd56a12f18f70c29777b73da12c832fa17cfcd09 (patch)
tree4d30cc032e41214dc6c517fab8b43efa515bdb80 /sys/dev/softraid_raid6.c
parentAdd proper kernel locking in the fpe_branch_emulate() function, to (diff)
downloadwireguard-openbsd-bd56a12f18f70c29777b73da12c832fa17cfcd09.tar.xz
wireguard-openbsd-bd56a12f18f70c29777b73da12c832fa17cfcd09.zip
Stop adding and subtracting data offset. Just keep to chunk relative
block offsets until actual i/o is constructed and needs the physical offset. Eliminate a number of <<DEV_BSIZE shifts as a bonus. No intentional functional change. Fixed and ok jsing@
Diffstat (limited to 'sys/dev/softraid_raid6.c')
-rw-r--r--sys/dev/softraid_raid6.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/softraid_raid6.c b/sys/dev/softraid_raid6.c
index 5234a11ecd7..0ba663bfa4f 100644
--- a/sys/dev/softraid_raid6.c
+++ b/sys/dev/softraid_raid6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid6.c,v 1.65 2015/05/29 13:48:45 krw Exp $ */
+/* $OpenBSD: softraid_raid6.c,v 1.66 2015/07/19 17:04:31 krw Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
@@ -411,8 +411,7 @@ 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 +
- (sd->sd_meta->ssd_data_offset << DEV_BSHIFT);
+ phys_offs = chunk_offs + strip_offs;
/* get size remaining in this stripe */
length = MIN(strip_size - strip_offs, datalen);