dbuf.c (297832) | dbuf.c (299435) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 894 unchanged lines hidden (view full) --- 903void 904dbuf_free_range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid, 905 dmu_tx_t *tx) 906{ 907 dmu_buf_impl_t db_search; 908 dmu_buf_impl_t *db, *db_next; 909 uint64_t txg = tx->tx_txg; 910 avl_index_t where; | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 894 unchanged lines hidden (view full) --- 903void 904dbuf_free_range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid, 905 dmu_tx_t *tx) 906{ 907 dmu_buf_impl_t db_search; 908 dmu_buf_impl_t *db, *db_next; 909 uint64_t txg = tx->tx_txg; 910 avl_index_t where; |
911 boolean_t freespill = 912 (start_blkid == DMU_SPILL_BLKID || end_blkid == DMU_SPILL_BLKID); |
|
911 | 913 |
912 if (end_blkid > dn->dn_maxblkid && (end_blkid != DMU_SPILL_BLKID)) | 914 if (end_blkid > dn->dn_maxblkid && !freespill) |
913 end_blkid = dn->dn_maxblkid; 914 dprintf_dnode(dn, "start=%llu end=%llu\n", start_blkid, end_blkid); 915 916 db_search.db_level = 0; 917 db_search.db_blkid = start_blkid; 918 db_search.db_state = DB_SEARCH; 919 920 mutex_enter(&dn->dn_dbufs_mtx); | 915 end_blkid = dn->dn_maxblkid; 916 dprintf_dnode(dn, "start=%llu end=%llu\n", start_blkid, end_blkid); 917 918 db_search.db_level = 0; 919 db_search.db_blkid = start_blkid; 920 db_search.db_state = DB_SEARCH; 921 922 mutex_enter(&dn->dn_dbufs_mtx); |
921 if (start_blkid >= dn->dn_unlisted_l0_blkid) { | 923 if (start_blkid >= dn->dn_unlisted_l0_blkid && !freespill) { |
922 /* There can't be any dbufs in this range; no need to search. */ 923#ifdef DEBUG 924 db = avl_find(&dn->dn_dbufs, &db_search, &where); 925 ASSERT3P(db, ==, NULL); 926 db = avl_nearest(&dn->dn_dbufs, where, AVL_AFTER); 927 ASSERT(db == NULL || db->db_level > 0); 928#endif 929 mutex_exit(&dn->dn_dbufs_mtx); --- 2287 unchanged lines hidden --- | 924 /* There can't be any dbufs in this range; no need to search. */ 925#ifdef DEBUG 926 db = avl_find(&dn->dn_dbufs, &db_search, &where); 927 ASSERT3P(db, ==, NULL); 928 db = avl_nearest(&dn->dn_dbufs, where, AVL_AFTER); 929 ASSERT(db == NULL || db->db_level > 0); 930#endif 931 mutex_exit(&dn->dn_dbufs_mtx); --- 2287 unchanged lines hidden --- |