]> granicus.if.org Git - zfs/commitdiff
Use linear abd in vdev_copy_uberblocks()
authorIsaac Huang <he.huang@intel.com>
Fri, 6 Oct 2017 02:30:02 +0000 (20:30 -0600)
committerTony Hutter <hutter2@llnl.gov>
Mon, 16 Oct 2017 17:57:55 +0000 (10:57 -0700)
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 <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Isaac Huang <he.huang@intel.com>
Closes #6718
Closes #6713

module/zfs/vdev_label.c

index a0a02366e1d9074c0484598983ee6de4c2d34820..27e79ae60e3381d6c4087412467beeb1dd33eed3 100644 (file)
@@ -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++) {