btree_cache.c (58404bb2362d8198c8b6618669ff949f84743ff6) btree_cache.c (c9bebae65eade6529f9d3068a6da42fc56664bfe)
1// SPDX-License-Identifier: GPL-2.0
2
3#include "bcachefs.h"
4#include "btree_cache.h"
5#include "btree_io.h"
6#include "btree_iter.h"
7#include "btree_locking.h"
8#include "debug.h"

--- 544 unchanged lines hidden (view full) ---

553 memalloc_nofs_restore(flags);
554out:
555 b->flags = 0;
556 b->written = 0;
557 b->nsets = 0;
558 b->sib_u64s[0] = 0;
559 b->sib_u64s[1] = 0;
560 b->whiteout_u64s = 0;
1// SPDX-License-Identifier: GPL-2.0
2
3#include "bcachefs.h"
4#include "btree_cache.h"
5#include "btree_io.h"
6#include "btree_iter.h"
7#include "btree_locking.h"
8#include "debug.h"

--- 544 unchanged lines hidden (view full) ---

553 memalloc_nofs_restore(flags);
554out:
555 b->flags = 0;
556 b->written = 0;
557 b->nsets = 0;
558 b->sib_u64s[0] = 0;
559 b->sib_u64s[1] = 0;
560 b->whiteout_u64s = 0;
561 b->uncompacted_whiteout_u64s = 0;
562 bch2_btree_keys_init(b, &c->expensive_debug_checks);
563
564 bch2_time_stats_update(&c->times[BCH_TIME_btree_node_mem_alloc],
565 start_time);
566
567 return b;
568err:
569 /* Try to cannibalize another cached btree node: */

--- 362 unchanged lines hidden ---
561 bch2_btree_keys_init(b, &c->expensive_debug_checks);
562
563 bch2_time_stats_update(&c->times[BCH_TIME_btree_node_mem_alloc],
564 start_time);
565
566 return b;
567err:
568 /* Try to cannibalize another cached btree node: */

--- 362 unchanged lines hidden ---