]> git.proxmox.com Git - mirror_zfs.git/blobdiff - include/sys/dnode.h
Remove incorrect (and inappropriate) comment in dprintf_dnode
[mirror_zfs.git] / include / sys / dnode.h
index 6fdde5067b0657b153bd325bd88ca9235ef14869..accbe6945e27c2e3bdf2bf8ae682ef538b99b584 100644 (file)
@@ -335,8 +335,8 @@ struct dnode {
        uint8_t *dn_dirtyctx_firstset;          /* dbg: contents meaningless */
 
        /* protected by own devices */
-       refcount_t dn_tx_holds;
-       refcount_t dn_holds;
+       zfs_refcount_t dn_tx_holds;
+       zfs_refcount_t dn_holds;
 
        kmutex_t dn_dbufs_mtx;
        /*
@@ -371,6 +371,12 @@ struct dnode {
        struct zfetch   dn_zfetch;
 };
 
+/*
+ * We use this (otherwise unused) bit to indicate if the value of
+ * dn_next_maxblkid[txgoff] is valid to use in dnode_sync().
+ */
+#define        DMU_NEXT_MAXBLKID_SET           (1ULL << 63)
+
 /*
  * Adds a level of indirection between the dbuf and the dnode to avoid
  * iterating descendent dbufs in dnode_move(). Handles are not allocated
@@ -408,7 +414,7 @@ int dnode_hold_impl(struct objset *dd, uint64_t object, int flag, int dn_slots,
     void *ref, dnode_t **dnp);
 boolean_t dnode_add_ref(dnode_t *dn, void *ref);
 void dnode_rele(dnode_t *dn, void *ref);
-void dnode_rele_and_unlock(dnode_t *dn, void *tag);
+void dnode_rele_and_unlock(dnode_t *dn, void *tag, boolean_t evicting);
 void dnode_setdirty(dnode_t *dn, dmu_tx_t *tx);
 void dnode_sync(dnode_t *dn, dmu_tx_t *tx);
 void dnode_allocate(dnode_t *dn, dmu_object_type_t ot, int blocksize, int ibs,
@@ -423,7 +429,8 @@ int dnode_set_nlevels(dnode_t *dn, int nlevels, dmu_tx_t *tx);
 int dnode_set_blksz(dnode_t *dn, uint64_t size, int ibs, dmu_tx_t *tx);
 void dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx);
 void dnode_diduse_space(dnode_t *dn, int64_t space);
-void dnode_new_blkid(dnode_t *dn, uint64_t blkid, dmu_tx_t *tx, boolean_t);
+void dnode_new_blkid(dnode_t *dn, uint64_t blkid, dmu_tx_t *tx,
+    boolean_t have_read, boolean_t force);
 uint64_t dnode_block_freed(dnode_t *dn, uint64_t blkid);
 void dnode_init(void);
 void dnode_fini(void);
@@ -582,11 +589,6 @@ extern dnode_stats_t dnode_stats;
 
 #ifdef ZFS_DEBUG
 
-/*
- * There should be a ## between the string literal and fmt, to make it
- * clear that we're joining two strings together, but that piece of shit
- * gcc doesn't support that preprocessor token.
- */
 #define        dprintf_dnode(dn, fmt, ...) do { \
        if (zfs_flags & ZFS_DEBUG_DPRINTF) { \
        char __db_buf[32]; \