Print this page
5056 ZFS deadlock on db_mtx and dn_holds
Reviewed by: Will Andrews <willa@spectralogic.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>

@@ -20,10 +20,11 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
+ * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
  */
 
 /* Portions Copyright 2010 Robert Milkowski */
 
 #ifndef _SYS_DMU_OBJSET_H

@@ -72,26 +73,29 @@
         struct dsl_dataset *os_dsl_dataset;
         spa_t *os_spa;
         arc_buf_t *os_phys_buf;
         objset_phys_t *os_phys;
         /*
-         * The following "special" dnodes have no parent and are exempt from
-         * dnode_move(), but they root their descendents in this objset using
-         * handles anyway, so that all access to dnodes from dbufs consistently
-         * uses handles.
+         * The following "special" dnodes have no parent, are exempt
+         * from dnode_move(), and are not recorded in os_dnodes, but they
+         * root their descendents in this objset using handles anyway, so
+         * that all access to dnodes from dbufs consistently uses handles.
          */
         dnode_handle_t os_meta_dnode;
         dnode_handle_t os_userused_dnode;
         dnode_handle_t os_groupused_dnode;
         zilog_t *os_zil;
 
+        list_node_t os_evicting_node;
+
         /* can change, under dsl_dir's locks: */
         enum zio_checksum os_checksum;
         enum zio_compress os_compress;
         uint8_t os_copies;
         enum zio_checksum os_dedup_checksum;
         boolean_t os_dedup_verify;
+        boolean_t os_evicting;
         zfs_logbias_op_t os_logbias;
         zfs_cache_type_t os_primary_cache;
         zfs_cache_type_t os_secondary_cache;
         zfs_sync_type_t os_sync;
         zfs_redundant_metadata_type_t os_redundant_metadata;

@@ -168,10 +172,12 @@
 boolean_t dmu_objset_userused_enabled(objset_t *os);
 int dmu_objset_userspace_upgrade(objset_t *os);
 boolean_t dmu_objset_userspace_present(objset_t *os);
 int dmu_fsname(const char *snapname, char *buf);
 
+void dmu_objset_evict_done(objset_t *os);
+
 void dmu_objset_init(void);
 void dmu_objset_fini(void);
 
 #ifdef  __cplusplus
 }