* v_freelist is locked by the global vnode_list_lock
* v_mntvnodes is locked by the mount_lock
* v_nclinks and v_ncchildren are protected by the global name_cache_lock
- * v_cleanblkhd and v_dirtyblkhd and v_iterblkflags are locked via the global buf_mtxp
+ * v_cleanblkhd and v_dirtyblkhd and v_iterblkflags are locked via the global buf_mtx
* the rest of the structure is protected by the vnode_lock
*/
struct vnode {
* if VFLINKTARGET is set, if VFLINKTARGET is not
* set, points to target */
#endif /* CONFIG_FIRMLINKS */
+#if CONFIG_IO_COMPRESSION_STATS
+ io_compression_stats_t io_compression_stats; /* IO compression statistics */
+#endif /* CONFIG_IO_COMPRESSION_STATS */
};
#define v_mountedhere v_un.vu_mountedhere
#endif /* BSD_KERNEL_PRIVATE */
+#if CONFIG_IO_COMPRESSION_STATS
+/*
+ * update the IO compression stats tracked at block granularity
+ */
+int vnode_updateiocompressionblockstats(vnode_t vp, uint32_t size_bucket);
+
+/*
+ * update the IO compression stats tracked for the buffer
+ */
+int vnode_updateiocompressionbufferstats(vnode_t vp, uint64_t uncompressed_size, uint64_t compressed_size, uint32_t size_bucket, uint32_t compression_bucket);
+
+#endif /* CONFIG_IO_COMPRESSION_STATS */
+
extern bool rootvp_is_ssd;
#endif /* !_SYS_VNODE_INTERNAL_H_ */