diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-17 10:56:44 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-20 22:52:31 -0400 |
commit | 7768f5052bede1376816708a6f456583da4686b3 (patch) | |
tree | 5e48f5909de5823b5c3004be6b93ea93cdc575bb /fs/bcachefs/btree_update_interior.c | |
parent | fe8186084ebc68b0f54ab9c008c1b7c365af536d (diff) |
bcachefs: Fix bch2_extent_fallocate() in nocow mode
When we allocate disk space, we need to be incrementing the WRITE io
clock, which perhaps should be renamed to sectors allocated - copygc
uses this io clock to know when to run.
Also, we should be incrementing the same clock when allocating btree
nodes.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_update_interior.c')
-rw-r--r-- | fs/bcachefs/btree_update_interior.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c index d64a86f39595..a58d2a142b67 100644 --- a/fs/bcachefs/btree_update_interior.c +++ b/fs/bcachefs/btree_update_interior.c @@ -11,6 +11,7 @@ #include "btree_iter.h" #include "btree_locking.h" #include "buckets.h" +#include "clock.h" #include "error.h" #include "extents.h" #include "journal.h" @@ -363,6 +364,7 @@ static struct btree *bch2_btree_node_alloc(struct btree_update *as, BUG_ON(ret); trace_and_count(c, btree_node_alloc, c, b); + bch2_increment_clock(c, btree_sectors(c), WRITE); return b; } |