Illumos #3498 panic in arc_read()
[zfs.git] / module / zfs / dsl_scan.c
index 297caa0..34a4f03 100644 (file)
@@ -363,24 +363,6 @@ dsl_free_sync(zio_t *pio, dsl_pool_t *dp, uint64_t txg, const blkptr_t *bpp)
        zio_nowait(zio_free_sync(pio, dp->dp_spa, txg, bpp, pio->io_flags));
 }
 
-int
-dsl_read(zio_t *pio, spa_t *spa, const blkptr_t *bpp, arc_buf_t *pbuf,
-    arc_done_func_t *done, void *private, int priority, int zio_flags,
-    uint32_t *arc_flags, const zbookmark_t *zb)
-{
-       return (arc_read(pio, spa, bpp, pbuf, done, private,
-           priority, zio_flags, arc_flags, zb));
-}
-
-int
-dsl_read_nolock(zio_t *pio, spa_t *spa, const blkptr_t *bpp,
-    arc_done_func_t *done, void *private, int priority, int zio_flags,
-    uint32_t *arc_flags, const zbookmark_t *zb)
-{
-       return (arc_read_nolock(pio, spa, bpp, done, private,
-           priority, zio_flags, arc_flags, zb));
-}
-
 static uint64_t
 dsl_scan_ds_maxtxg(dsl_dataset_t *ds)
 {
@@ -551,12 +533,8 @@ dsl_scan_prefetch(dsl_scan_t *scn, arc_buf_t *buf, blkptr_t *bp,
 
        SET_BOOKMARK(&czb, objset, object, BP_GET_LEVEL(bp), blkid);
 
-       /*
-        * XXX need to make sure all of these arc_read() prefetches are
-        * done before setting xlateall (similar to dsl_read())
-        */
        (void) arc_read(scn->scn_zio_root, scn->scn_dp->dp_spa, bp,
-           buf, NULL, NULL, ZIO_PRIORITY_ASYNC_READ,
+           NULL, NULL, ZIO_PRIORITY_ASYNC_READ,
            ZIO_FLAG_CANFAIL | ZIO_FLAG_SCAN_THREAD, &flags, &czb);
 }
 
@@ -614,8 +592,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype,
                blkptr_t *cbp;
                int epb = BP_GET_LSIZE(bp) >> SPA_BLKPTRSHIFT;
 
-               err = arc_read_nolock(NULL, dp->dp_spa, bp,
-                   arc_getbuf_func, bufp,
+               err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp,
                    ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb);
                if (err) {
                        scn->scn_phys.scn_errors++;
@@ -637,8 +614,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype,
        } else if (BP_GET_TYPE(bp) == DMU_OT_USERGROUP_USED) {
                uint32_t flags = ARC_WAIT;
 
-               err = arc_read_nolock(NULL, dp->dp_spa, bp,
-                   arc_getbuf_func, bufp,
+               err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp,
                    ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb);
                if (err) {
                        scn->scn_phys.scn_errors++;
@@ -650,8 +626,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype,
                int i, j;
                int epb = BP_GET_LSIZE(bp) >> DNODE_SHIFT;
 
-               err = arc_read_nolock(NULL, dp->dp_spa, bp,
-                   arc_getbuf_func, bufp,
+               err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp,
                    ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb);
                if (err) {
                        scn->scn_phys.scn_errors++;
@@ -673,8 +648,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype,
                uint32_t flags = ARC_WAIT;
                objset_phys_t *osp;
 
-               err = arc_read_nolock(NULL, dp->dp_spa, bp,
-                   arc_getbuf_func, bufp,
+               err = arc_read(NULL, dp->dp_spa, bp, arc_getbuf_func, bufp,
                    ZIO_PRIORITY_ASYNC_READ, zio_flags, &flags, zb);
                if (err) {
                        scn->scn_phys.scn_errors++;