diff options
author | 2015-07-19 17:04:31 +0000 | |
---|---|---|
committer | 2015-07-19 17:04:31 +0000 | |
commit | bd56a12f18f70c29777b73da12c832fa17cfcd09 (patch) | |
tree | 4d30cc032e41214dc6c517fab8b43efa515bdb80 /sys/dev/softraid_raid0.c | |
parent | Add proper kernel locking in the fpe_branch_emulate() function, to (diff) | |
download | wireguard-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_raid0.c')
-rw-r--r-- | sys/dev/softraid_raid0.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/softraid_raid0.c b/sys/dev/softraid_raid0.c index 510fa443b50..974eb1c347c 100644 --- a/sys/dev/softraid_raid0.c +++ b/sys/dev/softraid_raid0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid0.c,v 1.47 2014/11/18 02:37:30 tedu Exp $ */ +/* $OpenBSD: softraid_raid0.c,v 1.48 2015/07/19 17:04:31 krw Exp $ */ /* * Copyright (c) 2008 Marco Peereboom <marco@peereboom.us> * @@ -144,8 +144,7 @@ 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 + - (sd->sd_meta->ssd_data_offset << DEV_BSHIFT); + physoffs = chunkoffs + stripoffs; length = MIN(xs->datalen, strip_size - stripoffs); leftover = xs->datalen; data = xs->data; |