diff options
Diffstat (limited to 'fs/bcachefs/extents.h')
-rw-r--r-- | fs/bcachefs/extents.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/bcachefs/extents.h b/fs/bcachefs/extents.h index 1ce0d38d278a..303bab983ee8 100644 --- a/fs/bcachefs/extents.h +++ b/fs/bcachefs/extents.h @@ -272,6 +272,12 @@ bch2_extent_crc_unpack(const struct bkey *k, const union bch_extent_crc *crc) #undef common_fields } +static inline bool crc_is_compressed(struct bch_extent_crc_unpacked crc) +{ + return (crc.compression_type != BCH_COMPRESSION_NONE && + crc.compression_type != BCH_COMPRESSION_INCOMPRESSIBLE); +} + /* Extent entry iteration: */ #define extent_entry_next(_entry) \ |