From: Isaac Huang Date: Fri, 6 Oct 2017 02:30:02 +0000 (-0600) Subject: Use linear abd in vdev_copy_uberblocks() X-Git-Tag: zfs-0.7.3~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b97948276d86343e3f4a9aa1232af9e02106ceeb;p=zfs Use linear abd in vdev_copy_uberblocks() The vdev_copy_uberblocks() function should use abd_alloc_linear() to allocate ub_abd, because abd_to_buf(ub_abd)) is used later. Reviewed-by: George Melikov Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Signed-off-by: Isaac Huang Closes #6718 Closes #6713 --- diff --git a/module/zfs/vdev_label.c b/module/zfs/vdev_label.c index a0a02366e..27e79ae60 100644 --- a/module/zfs/vdev_label.c +++ b/module/zfs/vdev_label.c @@ -1164,7 +1164,7 @@ vdev_copy_uberblocks(vdev_t *vd) spa_config_enter(vd->vdev_spa, locks, FTAG, RW_READER); - ub_abd = abd_alloc(VDEV_UBERBLOCK_SIZE(vd), B_TRUE); + ub_abd = abd_alloc_linear(VDEV_UBERBLOCK_SIZE(vd), B_TRUE); write_zio = zio_root(vd->vdev_spa, NULL, NULL, flags); for (int n = 0; n < VDEV_UBERBLOCK_COUNT(vd); n++) {