diff --git a/module/os/linux/zfs/abd_os.c b/module/os/linux/zfs/abd_os.c index 9f1cb5b717da..20a01d7ad98b 100644 --- a/module/os/linux/zfs/abd_os.c +++ b/module/os/linux/zfs/abd_os.c @@ -537,7 +537,7 @@ abd_alloc_zero_scatter(void) #define zfs_kmap_atomic(chunk) ((void *)chunk) #define zfs_kunmap_atomic(addr) do { (void)(addr); } while (0) #define zfs_kmap(chunk) ((void *)chunk) -#define zfs_kunmap(chunk) ((void *)chunk) +#define zfs_kunmap(addr) do { (void)(addr); } while (0) #define zfs_kmap_local(chunk) ((void *)chunk) #define zfs_kunmap_local(addr) do { (void)(addr); } while (0) #define local_irq_save(flags) do { (void)(flags); } while (0) @@ -1063,7 +1063,7 @@ abd_iter_map(struct abd_iter *aiter) aiter->iter_mapsize = MIN(aiter->iter_sg->length - offset, aiter->iter_abd->abd_size - aiter->iter_pos); - paddr = zfs_kmap_local(sg_page(aiter->iter_sg)); + paddr = zfs_kmap(sg_page(aiter->iter_sg)); } aiter->iter_mapaddr = (char *)paddr + offset; @@ -1082,7 +1082,7 @@ abd_iter_unmap(struct abd_iter *aiter) if (!abd_is_linear(aiter->iter_abd)) { /* LINTED E_FUNC_SET_NOT_USED */ - zfs_kunmap_local(aiter->iter_mapaddr - aiter->iter_offset); + zfs_kunmap(aiter->iter_mapaddr - aiter->iter_offset); } ASSERT3P(aiter->iter_mapaddr, !=, NULL); diff --git a/module/zfs/zia.c b/module/zfs/zia.c index 18118f27cc77..f8ed90328f2c 100644 --- a/module/zfs/zia.c +++ b/module/zfs/zia.c @@ -655,6 +655,15 @@ zia_offload_abd_offset(void *provider, abd_t *abd, ret = dpusm->copy.from.generic(&mv, ABD_LINEAR_BUF(abd), size); ret = dpusm_to_ret(ret); + } + else if (abd_is_from_pages(abd) == B_TRUE) { + ret = dpusm->copy.from.scatterlist(&mv, + ABD_SCATTER(abd).abd_sgl, + ABD_SCATTER(abd).abd_nents, + size); + if (ret == 0) { + ret = ZIA_OK; + } } else { ret = abd_iterate_func(abd, offset, size, zia_offload_generic_cb, &mv);