]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/btree_cache.c
Update bcachefs sources to 8d3fc97ca3 bcachefs: Fixes for building in userspace
[bcachefs-tools-debian] / libbcachefs / btree_cache.c
index d1cbf9266fb4ebfb065cda1475179d352f31816d..75e744792a927bd59e92baf49623a791bdba70e0 100644 (file)
@@ -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;