summaryrefslogtreecommitdiff
path: root/fs/bcachefs/buckets.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/buckets.h')
-rw-r--r--fs/bcachefs/buckets.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/buckets.h b/fs/bcachefs/buckets.h
index a4bab66d8d17..8ab18b55595e 100644
--- a/fs/bcachefs/buckets.h
+++ b/fs/bcachefs/buckets.h
@@ -137,8 +137,8 @@ static inline u8 ptr_stale(struct bch_dev *ca,
return gen_after(ptr_bucket_mark(ca, ptr).gen, ptr->gen);
}
-static inline unsigned __ptr_disk_sectors(struct extent_ptr_decoded p,
- unsigned live_size)
+static inline s64 __ptr_disk_sectors(struct extent_ptr_decoded p,
+ unsigned live_size)
{
return live_size && p.crc.compression_type
? max(1U, DIV_ROUND_UP(live_size * p.crc.compressed_size,
@@ -146,7 +146,7 @@ static inline unsigned __ptr_disk_sectors(struct extent_ptr_decoded p,
: live_size;
}
-static inline unsigned ptr_disk_sectors(struct extent_ptr_decoded p)
+static inline s64 ptr_disk_sectors(struct extent_ptr_decoded p)
{
return __ptr_disk_sectors(p, p.crc.live_size);
}