Commit 75f02de4 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Use crc_is_compressed()

Trivial cleanup.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent c32fc674
...@@ -675,10 +675,9 @@ static s64 ptr_disk_sectors(s64 sectors, struct extent_ptr_decoded p) ...@@ -675,10 +675,9 @@ static s64 ptr_disk_sectors(s64 sectors, struct extent_ptr_decoded p)
{ {
EBUG_ON(sectors < 0); EBUG_ON(sectors < 0);
return p.crc.compression_type && return crc_is_compressed(p.crc)
p.crc.compression_type != BCH_COMPRESSION_TYPE_incompressible
? DIV_ROUND_UP_ULL(sectors * p.crc.compressed_size, ? DIV_ROUND_UP_ULL(sectors * p.crc.compressed_size,
p.crc.uncompressed_size) p.crc.uncompressed_size)
: sectors; : sectors;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment