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 <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Gvozden Neskovic <neskovic@gmail.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #5932 
Closes #5936
This commit is contained in:
Chunwei Chen 2017-03-28 11:06:22 -07:00 committed by Brian Behlendorf
parent 7c4f1514ff
commit 12aec7dcd9

View File

@ -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);
}