dbuf.c (240415) | dbuf.c (242845) |
---|---|
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 --- 2075 unchanged lines hidden (view full) --- 2084 /* 2085 * This dbuf has anonymous data associated with it. 2086 */ 2087 dbuf_set_data(db, NULL); 2088 VERIFY(arc_buf_remove_ref(buf, db) == 1); 2089 dbuf_evict(db); 2090 } else { 2091 VERIFY(arc_buf_remove_ref(db->db_buf, db) == 0); | 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 --- 2075 unchanged lines hidden (view full) --- 2084 /* 2085 * This dbuf has anonymous data associated with it. 2086 */ 2087 dbuf_set_data(db, NULL); 2088 VERIFY(arc_buf_remove_ref(buf, db) == 1); 2089 dbuf_evict(db); 2090 } else { 2091 VERIFY(arc_buf_remove_ref(db->db_buf, db) == 0); |
2092 if (!DBUF_IS_CACHEABLE(db)) | 2092 2093 /* 2094 * A dbuf will be eligible for eviction if either the 2095 * 'primarycache' property is set or a duplicate 2096 * copy of this buffer is already cached in the arc. 2097 * 2098 * In the case of the 'primarycache' a buffer 2099 * is considered for eviction if it matches the 2100 * criteria set in the property. 2101 * 2102 * To decide if our buffer is considered a 2103 * duplicate, we must call into the arc to determine 2104 * if multiple buffers are referencing the same 2105 * block on-disk. If so, then we simply evict 2106 * ourselves. 2107 */ 2108 if (!DBUF_IS_CACHEABLE(db) || 2109 arc_buf_eviction_needed(db->db_buf)) |
2093 dbuf_clear(db); 2094 else 2095 mutex_exit(&db->db_mtx); 2096 } 2097 } else { 2098 mutex_exit(&db->db_mtx); 2099 } 2100} --- 624 unchanged lines hidden --- | 2110 dbuf_clear(db); 2111 else 2112 mutex_exit(&db->db_mtx); 2113 } 2114 } else { 2115 mutex_exit(&db->db_mtx); 2116 } 2117} --- 624 unchanged lines hidden --- |