summaryrefslogtreecommitdiff
path: root/fs/bcachefs/buckets.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-10-07 15:57:47 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2019-10-08 21:29:08 -0400
commit25208f1dffb0772d297b205513d95fa4dcfdc591 (patch)
tree52e8df6b481bd1613ed0d3f99b31e868a4e11ef7 /fs/bcachefs/buckets.h
parent0fd7f43ba49c3834383e2f2e47628c29b383bca9 (diff)
bcachefs: Fix erasure coding disk space accountingec_disk_accounting
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);
}