diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-01-21 15:28:59 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:52 -0400 |
commit | 2abe542087d9cb1bc7bb8ac7ae262afccbdb7aa6 (patch) | |
tree | c33f5733a5cf3f091e59e5084be29ef5819a9f71 /fs/bcachefs/rebalance_types.h | |
parent | 7f4e1d5d0faff0d72e9f6708bf98488d76533846 (diff) | |
download | linux-2abe542087d9cb1bc7bb8ac7ae262afccbdb7aa6.tar.gz linux-2abe542087d9cb1bc7bb8ac7ae262afccbdb7aa6.tar.bz2 linux-2abe542087d9cb1bc7bb8ac7ae262afccbdb7aa6.zip |
bcachefs: Persist 64 bit io clocks
Originally, bcachefs - going back to bcache - stored, for each bucket, a
16 bit counter corresponding to how long it had been since the bucket
was read from. But, this required periodically rescaling counters on
every bucket to avoid wraparound. That wasn't an issue in bcache, where
we'd perodically rewrite the per bucket metadata all at once, but in
bcachefs we're trying to avoid having to walk every single bucket.
This patch switches to persisting 64 bit io clocks, corresponding to the
64 bit bucket timestaps introduced in the previous patch with
KEY_TYPE_alloc_v2.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/rebalance_types.h')
-rw-r--r-- | fs/bcachefs/rebalance_types.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/rebalance_types.h b/fs/bcachefs/rebalance_types.h index 192c6be20ced..2f62a643c39f 100644 --- a/fs/bcachefs/rebalance_types.h +++ b/fs/bcachefs/rebalance_types.h @@ -17,7 +17,7 @@ struct bch_fs_rebalance { atomic64_t work_unknown_dev; enum rebalance_state state; - unsigned long throttled_until_iotime; + u64 throttled_until_iotime; unsigned long throttled_until_cputime; struct bch_move_stats move_stats; |