From f30dd8601262c74caf148fe834418ad7c931af66 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Fri, 16 Oct 2020 21:39:16 -0400 Subject: bcachefs: Don't write bucket IO time lazily With the btree key cache code, we don't need to update the alloc btree lazily - and this will mean we can remove the bch2_alloc_write() call in the shutdown path. Future work: we really need to expend the bucket IO clocks from 16 to 64 bits, so that we don't have to rescale them. Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- fs/bcachefs/buckets.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'fs/bcachefs/buckets.h') diff --git a/fs/bcachefs/buckets.h b/fs/bcachefs/buckets.h index 7ee63413f83c..2e9c4e46c61c 100644 --- a/fs/bcachefs/buckets.h +++ b/fs/bcachefs/buckets.h @@ -58,12 +58,6 @@ static inline struct bucket *bucket(struct bch_dev *ca, size_t b) return __bucket(ca, b, false); } -static inline void bucket_io_clock_reset(struct bch_fs *c, struct bch_dev *ca, - size_t b, int rw) -{ - bucket(ca, b)->io_time[rw] = c->bucket_clock[rw].hand; -} - static inline u16 bucket_last_io(struct bch_fs *c, struct bucket *g, int rw) { return c->bucket_clock[rw].hand - g->io_time[rw]; -- cgit v1.2.3