aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorbenrubson <[email protected]>2017-11-02 16:01:56 +0100
committerBrian Behlendorf <[email protected]>2017-11-11 20:24:34 -0800
commit7c351e31d5961a65ebf8ba2110f941391834df55 (patch)
treeda98883400937d35fb4d608193036874509c385e /include
parentc0daec32f839f687a7b631ea8c292dfb2637478a (diff)
OpenZFS 7531 - Assign correct flags to prefetched buffers
Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Prakash Surya <[email protected]> Authored by: abraunegg <[email protected]> Approved by: Dan McDonald <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7531 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/468008cb
Diffstat (limited to 'include')
-rw-r--r--include/sys/dbuf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sys/dbuf.h b/include/sys/dbuf.h
index 5ee2d9ef8..633dfd25a 100644
--- a/include/sys/dbuf.h
+++ b/include/sys/dbuf.h
@@ -350,6 +350,12 @@ boolean_t dbuf_is_metadata(dmu_buf_impl_t *db);
(dbuf_is_metadata(_db) && \
((_db)->db_objset->os_secondary_cache == ZFS_CACHE_METADATA)))
+#define DNODE_LEVEL_IS_L2CACHEABLE(_dn, _level) \
+ ((_dn)->dn_objset->os_secondary_cache == ZFS_CACHE_ALL || \
+ (((_level) > 0 || \
+ DMU_OT_IS_METADATA((_dn)->dn_handle->dnh_dnode->dn_type)) && \
+ ((_dn)->dn_objset->os_secondary_cache == ZFS_CACHE_METADATA)))
+
#ifdef ZFS_DEBUG
/*