summaryrefslogtreecommitdiff
path: root/libbcachefs/btree_cache.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-11-13 20:04:21 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2022-11-13 20:07:22 -0500
commitc1e4d447f6dd0ee60495b651436d2055db7777ed (patch)
tree36a657f7018cecc6bad43e0e178ef1913154eba0 /libbcachefs/btree_cache.c
parent980f7437e2588d100456640cb863908a3cc6fc77 (diff)
Update bcachefs sources to 8d3fc97ca3 bcachefs: Fixes for building in userspace
Diffstat (limited to 'libbcachefs/btree_cache.c')
-rw-r--r--libbcachefs/btree_cache.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libbcachefs/btree_cache.c b/libbcachefs/btree_cache.c
index d1cbf926..75e74479 100644
--- a/libbcachefs/btree_cache.c
+++ b/libbcachefs/btree_cache.c
@@ -280,9 +280,11 @@ wait_on_io:
* the post write cleanup:
*/
if (bch2_verify_btree_ondisk)
- bch2_btree_node_write(c, b, SIX_LOCK_intent, 0);
+ bch2_btree_node_write(c, b, SIX_LOCK_intent,
+ BTREE_WRITE_cache_reclaim);
else
- __bch2_btree_node_write(c, b, 0);
+ __bch2_btree_node_write(c, b,
+ BTREE_WRITE_cache_reclaim);
six_unlock_write(&b->c.lock);
six_unlock_intent(&b->c.lock);
@@ -389,7 +391,7 @@ restart:
six_trylock_read(&b->c.lock)) {
list_move(&bc->live, &b->list);
mutex_unlock(&bc->lock);
- __bch2_btree_node_write(c, b, 0);
+ __bch2_btree_node_write(c, b, BTREE_WRITE_cache_reclaim);
six_unlock_read(&b->c.lock);
if (touched >= nr)
goto out_nounlock;
@@ -675,6 +677,7 @@ out:
b->flags = 0;
b->written = 0;
b->nsets = 0;
+ b->write_type = 0;
b->sib_u64s[0] = 0;
b->sib_u64s[1] = 0;
b->whiteout_u64s = 0;
@@ -1118,7 +1121,7 @@ wait_on_io:
btree_node_lock_nopath_nofail(trans, &b->c, SIX_LOCK_write);
if (btree_node_dirty(b)) {
- __bch2_btree_node_write(c, b, 0);
+ __bch2_btree_node_write(c, b, BTREE_WRITE_cache_reclaim);
six_unlock_write(&b->c.lock);
six_unlock_intent(&b->c.lock);
goto wait_on_io;