Illumos #3498 panic in arc_read()
[zfs.git] / module / zfs / zio.c
index 0993491..8cf0408 100644 (file)
@@ -789,6 +789,8 @@ zio_free_sync(zio_t *pio, spa_t *spa, uint64_t txg, const blkptr_t *bp,
        ASSERT(spa_syncing_txg(spa) == txg);
        ASSERT(spa_sync_pass(spa) < zfs_sync_pass_deferred_free);
 
+       arc_freed(spa, bp);
+
        zio = zio_create(pio, spa, txg, bp, NULL, BP_GET_PSIZE(bp),
            NULL, NULL, ZIO_TYPE_FREE, ZIO_PRIORITY_FREE, flags,
            NULL, 0, NULL, ZIO_STAGE_OPEN, ZIO_FREE_PIPELINE);
@@ -2049,7 +2051,7 @@ zio_ddt_collision(zio_t *zio, ddt_t *ddt, ddt_entry_t *dde)
 
                        ddt_exit(ddt);
 
-                       error = arc_read_nolock(NULL, spa, &blk,
+                       error = arc_read(NULL, spa, &blk,
                            arc_getbuf_func, &abuf, ZIO_PRIORITY_SYNC_READ,
                            ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE,
                            &aflags, &zio->io_bookmark);
@@ -2303,7 +2305,7 @@ zio_dva_allocate(zio_t *zio)
        }
 
        ASSERT(BP_IS_HOLE(bp));
-       ASSERT3U(BP_GET_NDVAS(bp), ==, 0);
+       ASSERT0(BP_GET_NDVAS(bp));
        ASSERT3U(zio->io_prop.zp_copies, >, 0);
        ASSERT3U(zio->io_prop.zp_copies, <=, spa_max_replication(spa));
        ASSERT3U(zio->io_size, ==, BP_GET_PSIZE(bp));
@@ -3234,4 +3236,16 @@ MODULE_PARM_DESC(zio_delay_max, "Max zio millisec delay before posting event");
 
 module_param(zio_requeue_io_start_cut_in_line, int, 0644);
 MODULE_PARM_DESC(zio_requeue_io_start_cut_in_line, "Prioritize requeued I/O");
+
+module_param(zfs_sync_pass_deferred_free, int, 0644);
+MODULE_PARM_DESC(zfs_sync_pass_deferred_free,
+    "defer frees starting in this pass");
+
+module_param(zfs_sync_pass_dont_compress, int, 0644);
+MODULE_PARM_DESC(zfs_sync_pass_dont_compress,
+    "don't compress starting in this pass");
+
+module_param(zfs_sync_pass_rewrite, int, 0644);
+MODULE_PARM_DESC(zfs_sync_pass_rewrite,
+    "rewrite new bps starting in this pass");
 #endif