diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-27 03:41:09 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:20 +0200 |
commit | 36f035e90804d30dba4336daafe1b89c9a8ffe98 (patch) | |
tree | 935bdb4ec5bb7f9df82c0d9d2828c411b020a71a /fs/bcachefs/buckets.c | |
parent | bcachefs: New in-memory array for bucket gens (diff) | |
download | linux-36f035e90804d30dba4336daafe1b89c9a8ffe98.tar.xz linux-36f035e90804d30dba4336daafe1b89c9a8ffe98.zip |
bcachefs: Fix allocator + journal interaction
The allocator needs to wait until the last update touching a bucket has
been commited before writing to it again. However, the code was checking
against the last dirty journal sequence number, not the last flushed
journal sequence number.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/buckets.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index 4b7fe4a5def9..917575597ce5 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -50,7 +50,7 @@ static inline void fs_usage_data_type_to_base(struct bch_fs_usage *fs_usage, void bch2_bucket_seq_cleanup(struct bch_fs *c) { u64 journal_seq = atomic64_read(&c->journal.seq); - u16 last_seq_ondisk = c->journal.last_seq_ondisk; + u16 last_seq_ondisk = c->journal.flushed_seq_ondisk; struct bch_dev *ca; struct bucket_array *buckets; struct bucket *g; |