mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Skip evicting dbufs when walking the dbuf hash
When a dbuf is in the DB_EVICTING state it may no longer be on the dn_dbufs list. In which case it's unsafe to call DB_DNODE_ENTER. Therefore, any dbuf which is found in this safe must be skipped. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2553 Closes #2495
This commit is contained in:
		
							parent
							
								
									aa506dcb3d
								
							
						
					
					
						commit
						e2c4acde55
					
				| @ -151,9 +151,11 @@ dbuf_stats_hash_table_data(char *buf, size_t size, void *data) | ||||
| 		mutex_enter(&db->db_mtx); | ||||
| 		mutex_exit(DBUF_HASH_MUTEX(h, dsh->idx)); | ||||
| 
 | ||||
| 		length = __dbuf_stats_hash_table_data(buf, size, db); | ||||
| 		buf += length; | ||||
| 		size -= length; | ||||
| 		if (db->db_state != DB_EVICTING) { | ||||
| 			length = __dbuf_stats_hash_table_data(buf, size, db); | ||||
| 			buf += length; | ||||
| 			size -= length; | ||||
| 		} | ||||
| 
 | ||||
| 		mutex_exit(&db->db_mtx); | ||||
| 		mutex_enter(DBUF_HASH_MUTEX(h, dsh->idx)); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Brian Behlendorf
						Brian Behlendorf