From 12aec7dcd9b1f4c86eb71d5b9dc737433ee93167 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Tue, 28 Mar 2017 11:06:22 -0700 Subject: [PATCH] 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 Reviewed-by: Brian Behlendorf Reviewed-by: Gvozden Neskovic Signed-off-by: Chunwei Chen Closes #5932 Closes #5936 --- module/zfs/vdev_cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/zfs/vdev_cache.c b/module/zfs/vdev_cache.c index ec701097bde1..7317373b8a02 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); }