Deleted Added
full compact
52,57d51
< /*
< * Number of times that zfs_free_range() took the slow path while doing
< * a zfs receive. A nonzero value indicates a potential performance problem.
< */
< uint64_t zfs_free_range_recv_miss;
<
1223,1225d1216
< *
< * This is a no-op if the dataset is in the middle of an incremental
< * receive; see comment below for details.
1235,1236d1225
< boolean_t freespill =
< (start_blkid == DMU_SPILL_BLKID || end_blkid == DMU_SPILL_BLKID);
1238c1227,1228
< if (end_blkid > dn->dn_maxblkid && !freespill)
---
> if (end_blkid > dn->dn_maxblkid &&
> !(start_blkid == DMU_SPILL_BLKID || end_blkid == DMU_SPILL_BLKID))
1247,1267d1236
< if (start_blkid >= dn->dn_unlisted_l0_blkid && !freespill) {
< /* There can't be any dbufs in this range; no need to search. */
< #ifdef DEBUG
< db = avl_find(&dn->dn_dbufs, &db_search, &where);
< ASSERT3P(db, ==, NULL);
< db = avl_nearest(&dn->dn_dbufs, where, AVL_AFTER);
< ASSERT(db == NULL || db->db_level > 0);
< #endif
< mutex_exit(&dn->dn_dbufs_mtx);
< return;
< } else if (dmu_objset_is_receiving(dn->dn_objset)) {
< /*
< * If we are receiving, we expect there to be no dbufs in
< * the range to be freed, because receive modifies each
< * block at most once, and in offset order. If this is
< * not the case, it can lead to performance problems,
< * so note that we unexpectedly took the slow path.
< */
< atomic_inc_64(&zfs_free_range_recv_miss);
< }
<
1269a1239
>
2286,2288c2256
< if (db->db_level == 0 && db->db_blkid >=
< dn->dn_unlisted_l0_blkid)
< dn->dn_unlisted_l0_blkid = db->db_blkid + 1;
---
>