aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunwei Chen <[email protected]>2017-03-28 11:06:22 -0700
committerBrian Behlendorf <[email protected]>2017-03-28 11:06:22 -0700
commit12aec7dcd9b1f4c86eb71d5b9dc737433ee93167 (patch)
tree776a4de5d100bd3af7c0cc330323915514ff12ae
parent7c4f1514ff65c547d6cab6d0720bf0678a59eec9 (diff)
Fix wrong offset args in vdev_cache_write
The offset arguments is wrong when changing to abd_copy_off in a6255b7 Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Gvozden Neskovic <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes #5932 Closes #5936
-rw-r--r--module/zfs/vdev_cache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/zfs/vdev_cache.c b/module/zfs/vdev_cache.c
index ec701097b..7317373b8 100644
--- a/module/zfs/vdev_cache.c
+++ b/module/zfs/vdev_cache.c
@@ -355,8 +355,9 @@ vdev_cache_write(zio_t *zio)
if (ve->ve_fill_io != NULL) {
ve->ve_missed_update = 1;
} else {
- abd_copy_off(ve->ve_abd, zio->io_abd, start - io_start,
- start - ve->ve_offset, end - start);
+ abd_copy_off(ve->ve_abd, zio->io_abd,
+ start - ve->ve_offset, start - io_start,
+ end - start);
}
ve = AVL_NEXT(&vc->vc_offset_tree, ve);
}