btree 222 drivers/md/bcache/bcache.h struct btree; btree 276 drivers/md/bcache/bcache.h int (*cache_miss)(struct btree *b, struct search *s, btree 662 drivers/md/bcache/bcache.h struct btree *root; btree 665 drivers/md/bcache/bcache.h struct btree *verify_data; btree 126 drivers/md/bcache/btree.c struct btree *_child = bch_btree_node_get((b)->c, op, key, l, \ btree 146 drivers/md/bcache/btree.c struct btree *_b = (c)->root; \ btree 163 drivers/md/bcache/btree.c static inline struct bset *write_block(struct btree *b) btree 168 drivers/md/bcache/btree.c static void bch_btree_init_next(struct btree *b) btree 195 drivers/md/bcache/btree.c static uint64_t btree_csum_set(struct btree *b, struct bset *i) btree 204 drivers/md/bcache/btree.c void bch_btree_node_read_done(struct btree *b) btree 299 drivers/md/bcache/btree.c static void bch_btree_node_read(struct btree *b) btree 337 drivers/md/bcache/btree.c static void btree_complete_write(struct btree *b, struct btree_write *w) btree 354 drivers/md/bcache/btree.c struct btree *b = container_of(cl, struct btree, io); btree 361 drivers/md/bcache/btree.c struct btree *b = container_of(cl, struct btree, io); btree 376 drivers/md/bcache/btree.c struct btree *b = container_of(cl, struct btree, io); btree 385 drivers/md/bcache/btree.c struct btree *b = container_of(cl, struct btree, io); btree 394 drivers/md/bcache/btree.c static void do_btree_node_write(struct btree *b) btree 459 drivers/md/bcache/btree.c void __bch_btree_node_write(struct btree *b, struct closure *parent) btree 490 drivers/md/bcache/btree.c void bch_btree_node_write(struct btree *b, struct closure *parent) btree 508 drivers/md/bcache/btree.c static void bch_btree_node_write_sync(struct btree *b) btree 523 drivers/md/bcache/btree.c struct btree *b = container_of(to_delayed_work(w), struct btree, work); btree 531 drivers/md/bcache/btree.c static void bch_btree_leaf_dirty(struct btree *b, atomic_t *journal_ref) btree 575 drivers/md/bcache/btree.c static void mca_data_free(struct btree *b) btree 585 drivers/md/bcache/btree.c static void mca_bucket_free(struct btree *b) btree 599 drivers/md/bcache/btree.c static void mca_data_alloc(struct btree *b, struct bkey *k, gfp_t gfp) btree 613 drivers/md/bcache/btree.c static struct btree *mca_bucket_alloc(struct cache_set *c, btree 620 drivers/md/bcache/btree.c struct btree *b = kzalloc(sizeof(struct btree), gfp); btree 638 drivers/md/bcache/btree.c static int mca_reap(struct btree *b, unsigned int min_order, bool flush) btree 701 drivers/md/bcache/btree.c struct btree *b, *t; btree 749 drivers/md/bcache/btree.c b = list_first_entry(&c->btree_cache, struct btree, list); btree 782 drivers/md/bcache/btree.c struct btree *b; btree 803 drivers/md/bcache/btree.c b = list_first_entry(&c->btree_cache, struct btree, list); btree 819 drivers/md/bcache/btree.c struct btree, list); btree 873 drivers/md/bcache/btree.c static struct btree *mca_find(struct cache_set *c, struct bkey *k) btree 875 drivers/md/bcache/btree.c struct btree *b; btree 902 drivers/md/bcache/btree.c static struct btree *mca_cannibalize(struct cache_set *c, struct btree_op *op, btree 905 drivers/md/bcache/btree.c struct btree *b; btree 938 drivers/md/bcache/btree.c static struct btree *mca_alloc(struct cache_set *c, struct btree_op *op, btree 941 drivers/md/bcache/btree.c struct btree *b; btree 1018 drivers/md/bcache/btree.c struct btree *bch_btree_node_get(struct cache_set *c, struct btree_op *op, btree 1020 drivers/md/bcache/btree.c struct btree *parent) btree 1023 drivers/md/bcache/btree.c struct btree *b; btree 1076 drivers/md/bcache/btree.c static void btree_node_prefetch(struct btree *parent, struct bkey *k) btree 1078 drivers/md/bcache/btree.c struct btree *b; btree 1093 drivers/md/bcache/btree.c static void btree_node_free(struct btree *b) btree 1129 drivers/md/bcache/btree.c struct btree *__bch_btree_node_alloc(struct cache_set *c, struct btree_op *op, btree 1131 drivers/md/bcache/btree.c struct btree *parent) btree 1134 drivers/md/bcache/btree.c struct btree *b = ERR_PTR(-EAGAIN); btree 1171 drivers/md/bcache/btree.c static struct btree *bch_btree_node_alloc(struct cache_set *c, btree 1173 drivers/md/bcache/btree.c struct btree *parent) btree 1178 drivers/md/bcache/btree.c static struct btree *btree_node_alloc_replacement(struct btree *b, btree 1181 drivers/md/bcache/btree.c struct btree *n = bch_btree_node_alloc(b->c, op, b->level, b->parent); btree 1193 drivers/md/bcache/btree.c static void make_btree_freeing_key(struct btree *b, struct bkey *k) btree 1212 drivers/md/bcache/btree.c static int btree_check_reserve(struct btree *b, struct btree_op *op) btree 1315 drivers/md/bcache/btree.c static bool btree_gc_mark_node(struct btree *b, struct gc_stat *gc) btree 1360 drivers/md/bcache/btree.c struct btree *b; btree 1364 drivers/md/bcache/btree.c static int bch_btree_insert_node(struct btree *b, struct btree_op *op, btree 1369 drivers/md/bcache/btree.c static int btree_gc_coalesce(struct btree *b, struct btree_op *op, btree 1373 drivers/md/bcache/btree.c struct btree *new_nodes[GC_MERGE_NODES]; btree 1536 drivers/md/bcache/btree.c static int btree_gc_rewrite_node(struct btree *b, struct btree_op *op, btree 1537 drivers/md/bcache/btree.c struct btree *replace) btree 1540 drivers/md/bcache/btree.c struct btree *n; btree 1572 drivers/md/bcache/btree.c static unsigned int btree_gc_count_keys(struct btree *b) btree 1610 drivers/md/bcache/btree.c static int btree_gc_recurse(struct btree *b, struct btree_op *op, btree 1700 drivers/md/bcache/btree.c static int bch_btree_gc_root(struct btree *b, struct btree_op *op, btree 1703 drivers/md/bcache/btree.c struct btree *n = NULL; btree 1917 drivers/md/bcache/btree.c static int bch_btree_check_recurse(struct btree *b, struct btree_op *op) btree 1944 drivers/md/bcache/btree.c ret = btree(check_recurse, p, b, op); btree 2003 drivers/md/bcache/btree.c static bool btree_insert_key(struct btree *b, struct bkey *k, btree 2022 drivers/md/bcache/btree.c static size_t insert_u64s_remaining(struct btree *b) btree 2035 drivers/md/bcache/btree.c static bool bch_btree_insert_keys(struct btree *b, struct btree_op *op, btree 2077 drivers/md/bcache/btree.c static int btree_split(struct btree *b, struct btree_op *op, btree 2082 drivers/md/bcache/btree.c struct btree *n1, *n2 = NULL, *n3 = NULL; btree 2211 drivers/md/bcache/btree.c static int bch_btree_insert_node(struct btree *b, struct btree_op *op, btree 2267 drivers/md/bcache/btree.c int bch_btree_insert_check_key(struct btree *b, struct btree_op *op, btree 2312 drivers/md/bcache/btree.c static int btree_insert_fn(struct btree_op *b_op, struct btree *b) btree 2359 drivers/md/bcache/btree.c void bch_btree_set_root(struct btree *b) btree 2385 drivers/md/bcache/btree.c static int bch_btree_map_nodes_recurse(struct btree *b, struct btree_op *op, btree 2399 drivers/md/bcache/btree.c ret = btree(map_nodes_recurse, k, b, btree 2420 drivers/md/bcache/btree.c static int bch_btree_map_keys_recurse(struct btree *b, struct btree_op *op, btree 2433 drivers/md/bcache/btree.c : btree(map_keys_recurse, k, b, op, from, fn, flags); btree 2479 drivers/md/bcache/btree.c static int refill_keybuf_fn(struct btree_op *op, struct btree *b, btree 129 drivers/md/bcache/btree.h struct btree *parent; btree 151 drivers/md/bcache/btree.h static inline bool btree_node_ ## flag(struct btree *b) \ btree 154 drivers/md/bcache/btree.h static inline void set_btree_node_ ## flag(struct btree *b) \ btree 169 drivers/md/bcache/btree.h static inline struct btree_write *btree_current_write(struct btree *b) btree 174 drivers/md/bcache/btree.h static inline struct btree_write *btree_prev_write(struct btree *b) btree 179 drivers/md/bcache/btree.h static inline struct bset *btree_bset_first(struct btree *b) btree 184 drivers/md/bcache/btree.h static inline struct bset *btree_bset_last(struct btree *b) btree 189 drivers/md/bcache/btree.h static inline unsigned int bset_block_offset(struct btree *b, struct bset *i) btree 228 drivers/md/bcache/btree.h static inline void rw_lock(bool w, struct btree *b, int level) btree 236 drivers/md/bcache/btree.h static inline void rw_unlock(bool w, struct btree *b) btree 243 drivers/md/bcache/btree.h void bch_btree_node_read_done(struct btree *b); btree 244 drivers/md/bcache/btree.h void __bch_btree_node_write(struct btree *b, struct closure *parent); btree 245 drivers/md/bcache/btree.h void bch_btree_node_write(struct btree *b, struct closure *parent); btree 247 drivers/md/bcache/btree.h void bch_btree_set_root(struct btree *b); btree 248 drivers/md/bcache/btree.h struct btree *__bch_btree_node_alloc(struct cache_set *c, struct btree_op *op, btree 250 drivers/md/bcache/btree.h struct btree *parent); btree 251 drivers/md/bcache/btree.h struct btree *bch_btree_node_get(struct cache_set *c, struct btree_op *op, btree 253 drivers/md/bcache/btree.h struct btree *parent); btree 255 drivers/md/bcache/btree.h int bch_btree_insert_check_key(struct btree *b, struct btree_op *op, btree 297 drivers/md/bcache/btree.h typedef int (btree_map_nodes_fn)(struct btree_op *b_op, struct btree *b); btree 315 drivers/md/bcache/btree.h typedef int (btree_map_keys_fn)(struct btree_op *op, struct btree *b, btree 31 drivers/md/bcache/debug.c void bch_btree_verify(struct btree *b) btree 33 drivers/md/bcache/debug.c struct btree *v = b->c->verify_data; btree 11 drivers/md/bcache/debug.h void bch_btree_verify(struct btree *b); btree 20 drivers/md/bcache/debug.h static inline void bch_btree_verify(struct btree *b) {} btree 128 drivers/md/bcache/extents.c struct btree *b = container_of(keys, struct btree, keys); btree 168 drivers/md/bcache/extents.c struct btree *b = container_of(bk, struct btree, keys); btree 173 drivers/md/bcache/extents.c static bool btree_ptr_bad_expensive(struct btree *b, const struct bkey *k) btree 207 drivers/md/bcache/extents.c struct btree *b = container_of(bk, struct btree, keys); btree 232 drivers/md/bcache/extents.c struct btree *b = container_of(bk, struct btree, keys); btree 328 drivers/md/bcache/extents.c struct cache_set *c = container_of(b, struct btree, keys)->c; btree 502 drivers/md/bcache/extents.c struct btree *b = container_of(bk, struct btree, keys); btree 507 drivers/md/bcache/extents.c static bool bch_extent_bad_expensive(struct btree *b, const struct bkey *k, btree 539 drivers/md/bcache/extents.c struct btree *b = container_of(bk, struct btree, keys); btree 585 drivers/md/bcache/extents.c struct btree *b = container_of(bk, struct btree, keys); btree 424 drivers/md/bcache/journal.c struct btree *b, *t, *btree_nodes[BTREE_FLUSH_NR]; btree 524 drivers/md/bcache/request.c static int cache_lookup_fn(struct btree_op *op, struct btree *b, struct bkey *k) btree 888 drivers/md/bcache/request.c static int cached_dev_cache_miss(struct btree *b, struct search *s, btree 1289 drivers/md/bcache/request.c static int flash_dev_cache_miss(struct btree *b, struct search *s, btree 1615 drivers/md/bcache/super.c struct btree *b; btree 596 drivers/md/bcache/sysfs.c static int bch_btree_bset_stats(struct btree_op *b_op, struct btree *b) btree 636 drivers/md/bcache/sysfs.c struct btree *b; btree 659 drivers/md/bcache/sysfs.c struct btree *b; btree 762 drivers/md/bcache/writeback.c static int sectors_dirty_init_fn(struct btree_op *_op, struct btree *b, btree 466 fs/hpfs/alloc.c f->btree.n_free_nodes = 8; btree 467 fs/hpfs/alloc.c f->btree.first_free = cpu_to_le16(8); btree 483 fs/hpfs/alloc.c a->btree.n_free_nodes = 40; btree 484 fs/hpfs/alloc.c a->btree.n_used_nodes = 0; btree 485 fs/hpfs/alloc.c a->btree.first_free = cpu_to_le16(8); btree 15 fs/hpfs/anode.c struct bplus_header *btree, unsigned sec, btree 24 fs/hpfs/anode.c if (bp_internal(btree)) { btree 25 fs/hpfs/anode.c for (i = 0; i < btree->n_used_nodes; i++) btree 26 fs/hpfs/anode.c if (le32_to_cpu(btree->u.internal[i].file_secno) > sec) { btree 27 fs/hpfs/anode.c a = le32_to_cpu(btree->u.internal[i].down); btree 30 fs/hpfs/anode.c btree = &anode->btree; btree 37 fs/hpfs/anode.c for (i = 0; i < btree->n_used_nodes; i++) btree 38 fs/hpfs/anode.c if (le32_to_cpu(btree->u.external[i].file_secno) <= sec && btree 39 fs/hpfs/anode.c le32_to_cpu(btree->u.external[i].file_secno) + le32_to_cpu(btree->u.external[i].length) > sec) { btree 40 fs/hpfs/anode.c a = le32_to_cpu(btree->u.external[i].disk_secno) + sec - le32_to_cpu(btree->u.external[i].file_secno); btree 47 fs/hpfs/anode.c hpfs_inode->i_file_sec = le32_to_cpu(btree->u.external[i].file_secno); btree 48 fs/hpfs/anode.c hpfs_inode->i_disk_sec = le32_to_cpu(btree->u.external[i].disk_secno); btree 49 fs/hpfs/anode.c hpfs_inode->i_n_secs = le32_to_cpu(btree->u.external[i].length); btree 63 fs/hpfs/anode.c struct bplus_header *btree; btree 74 fs/hpfs/anode.c btree = &fnode->btree; btree 77 fs/hpfs/anode.c btree = &anode->btree; btree 81 fs/hpfs/anode.c if ((n = btree->n_used_nodes - 1) < -!!fnod) { btree 86 fs/hpfs/anode.c if (bp_internal(btree)) { btree 87 fs/hpfs/anode.c a = le32_to_cpu(btree->u.internal[n].down); btree 88 fs/hpfs/anode.c btree->u.internal[n].file_secno = cpu_to_le32(-1); btree 94 fs/hpfs/anode.c btree = &anode->btree; btree 98 fs/hpfs/anode.c if (le32_to_cpu(btree->u.external[n].file_secno) + le32_to_cpu(btree->u.external[n].length) != fsecno) { btree 100 fs/hpfs/anode.c le32_to_cpu(btree->u.external[n].file_secno) + le32_to_cpu(btree->u.external[n].length), fsecno, btree 105 fs/hpfs/anode.c if (hpfs_alloc_if_possible(s, se = le32_to_cpu(btree->u.external[n].disk_secno) + le32_to_cpu(btree->u.external[n].length))) { btree 106 fs/hpfs/anode.c le32_add_cpu(&btree->u.external[n].length, 1); btree 123 fs/hpfs/anode.c fs = n < 0 ? 0 : le32_to_cpu(btree->u.external[n].file_secno) + le32_to_cpu(btree->u.external[n].length); btree 124 fs/hpfs/anode.c if (!btree->n_free_nodes) { btree 133 fs/hpfs/anode.c anode->btree.flags |= BP_fnode_parent; btree 134 fs/hpfs/anode.c anode->btree.n_used_nodes = btree->n_used_nodes; btree 135 fs/hpfs/anode.c anode->btree.first_free = btree->first_free; btree 136 fs/hpfs/anode.c anode->btree.n_free_nodes = 40 - anode->btree.n_used_nodes; btree 137 fs/hpfs/anode.c memcpy(&anode->u, &btree->u, btree->n_used_nodes * 12); btree 138 fs/hpfs/anode.c btree->flags |= BP_internal; btree 139 fs/hpfs/anode.c btree->n_free_nodes = 11; btree 140 fs/hpfs/anode.c btree->n_used_nodes = 1; btree 141 fs/hpfs/anode.c btree->first_free = cpu_to_le16((char *)&(btree->u.internal[1]) - (char *)btree); btree 142 fs/hpfs/anode.c btree->u.internal[0].file_secno = cpu_to_le32(-1); btree 143 fs/hpfs/anode.c btree->u.internal[0].down = cpu_to_le32(na); btree 154 fs/hpfs/anode.c btree = &anode->btree; btree 156 fs/hpfs/anode.c btree->n_free_nodes--; n = btree->n_used_nodes++; btree 157 fs/hpfs/anode.c le16_add_cpu(&btree->first_free, 12); btree 158 fs/hpfs/anode.c btree->u.external[n].disk_secno = cpu_to_le32(se); btree 159 fs/hpfs/anode.c btree->u.external[n].file_secno = cpu_to_le32(fs); btree 160 fs/hpfs/anode.c btree->u.external[n].length = cpu_to_le32(1); btree 171 fs/hpfs/anode.c btree = &anode->btree; btree 174 fs/hpfs/anode.c btree = &fnode->btree; btree 176 fs/hpfs/anode.c if (btree->n_free_nodes) { btree 177 fs/hpfs/anode.c btree->n_free_nodes--; n = btree->n_used_nodes++; btree 178 fs/hpfs/anode.c le16_add_cpu(&btree->first_free, 8); btree 179 fs/hpfs/anode.c btree->u.internal[n].file_secno = cpu_to_le32(-1); btree 180 fs/hpfs/anode.c btree->u.internal[n].down = cpu_to_le32(na); btree 181 fs/hpfs/anode.c btree->u.internal[n-1].file_secno = cpu_to_le32(fs); btree 189 fs/hpfs/anode.c anode->btree.flags |= BP_fnode_parent; btree 191 fs/hpfs/anode.c anode->btree.flags &= ~BP_fnode_parent; btree 198 fs/hpfs/anode.c btree->u.internal[btree->n_used_nodes - 1].file_secno = cpu_to_le32(/*fs*/-1); btree 205 fs/hpfs/anode.c anode->btree.flags |= BP_internal; btree 206 fs/hpfs/anode.c anode->btree.n_used_nodes = 1; btree 207 fs/hpfs/anode.c anode->btree.n_free_nodes = 59; btree 208 fs/hpfs/anode.c anode->btree.first_free = cpu_to_le16(16); btree 209 fs/hpfs/anode.c anode->btree.u.internal[0].down = cpu_to_le32(a); btree 210 fs/hpfs/anode.c anode->btree.u.internal[0].file_secno = cpu_to_le32(-1); btree 223 fs/hpfs/anode.c anode->btree.flags |= BP_fnode_parent; btree 232 fs/hpfs/anode.c btree = &anode->btree; btree 238 fs/hpfs/anode.c btree = &fnode->btree; btree 241 fs/hpfs/anode.c memcpy(&ranode->btree, btree, le16_to_cpu(btree->first_free)); btree 243 fs/hpfs/anode.c ranode->btree.flags |= BP_fnode_parent; btree 244 fs/hpfs/anode.c ranode->btree.n_free_nodes = (bp_internal(&ranode->btree) ? 60 : 40) - ranode->btree.n_used_nodes; btree 245 fs/hpfs/anode.c if (bp_internal(&ranode->btree)) for (n = 0; n < ranode->btree.n_used_nodes; n++) { btree 249 fs/hpfs/anode.c unode->btree.flags &= ~BP_fnode_parent; btree 254 fs/hpfs/anode.c btree->flags |= BP_internal; btree 255 fs/hpfs/anode.c btree->n_free_nodes = fnod ? 10 : 58; btree 256 fs/hpfs/anode.c btree->n_used_nodes = 2; btree 257 fs/hpfs/anode.c btree->first_free = cpu_to_le16((char *)&btree->u.internal[2] - (char *)btree); btree 258 fs/hpfs/anode.c btree->u.internal[0].file_secno = cpu_to_le32(fs); btree 259 fs/hpfs/anode.c btree->u.internal[0].down = cpu_to_le32(ra); btree 260 fs/hpfs/anode.c btree->u.internal[1].file_secno = cpu_to_le32(-1); btree 261 fs/hpfs/anode.c btree->u.internal[1].down = cpu_to_le32(na); btree 274 fs/hpfs/anode.c void hpfs_remove_btree(struct super_block *s, struct bplus_header *btree) btree 276 fs/hpfs/anode.c struct bplus_header *btree1 = btree; btree 294 fs/hpfs/anode.c btree1 = &anode->btree; btree 310 fs/hpfs/anode.c btree1 = &anode->btree; btree 311 fs/hpfs/anode.c } else btree1 = btree; btree 335 fs/hpfs/anode.c return hpfs_bplus_lookup(s, NULL, &anode->btree, sec, bh); btree 391 fs/hpfs/anode.c hpfs_remove_btree(s, &anode->btree); btree 404 fs/hpfs/anode.c struct bplus_header *btree; btree 410 fs/hpfs/anode.c btree = &fnode->btree; btree 413 fs/hpfs/anode.c btree = &anode->btree; btree 416 fs/hpfs/anode.c hpfs_remove_btree(s, btree); btree 418 fs/hpfs/anode.c btree->n_free_nodes = 8; btree 419 fs/hpfs/anode.c btree->n_used_nodes = 0; btree 420 fs/hpfs/anode.c btree->first_free = cpu_to_le16(8); btree 421 fs/hpfs/anode.c btree->flags &= ~BP_internal; btree 427 fs/hpfs/anode.c while (bp_internal(btree)) { btree 428 fs/hpfs/anode.c nodes = btree->n_used_nodes + btree->n_free_nodes; btree 429 fs/hpfs/anode.c for (i = 0; i < btree->n_used_nodes; i++) btree 430 fs/hpfs/anode.c if (le32_to_cpu(btree->u.internal[i].file_secno) >= secs) goto f; btree 435 fs/hpfs/anode.c for (j = i + 1; j < btree->n_used_nodes; j++) btree 436 fs/hpfs/anode.c hpfs_ea_remove(s, le32_to_cpu(btree->u.internal[j].down), 1, 0); btree 437 fs/hpfs/anode.c btree->n_used_nodes = i + 1; btree 438 fs/hpfs/anode.c btree->n_free_nodes = nodes - btree->n_used_nodes; btree 439 fs/hpfs/anode.c btree->first_free = cpu_to_le16(8 + 8 * btree->n_used_nodes); btree 441 fs/hpfs/anode.c if (btree->u.internal[i].file_secno == cpu_to_le32(secs)) { btree 445 fs/hpfs/anode.c node = le32_to_cpu(btree->u.internal[i].down); btree 451 fs/hpfs/anode.c btree = &anode->btree; btree 453 fs/hpfs/anode.c nodes = btree->n_used_nodes + btree->n_free_nodes; btree 454 fs/hpfs/anode.c for (i = 0; i < btree->n_used_nodes; i++) btree 455 fs/hpfs/anode.c if (le32_to_cpu(btree->u.external[i].file_secno) + le32_to_cpu(btree->u.external[i].length) >= secs) goto ff; btree 459 fs/hpfs/anode.c if (secs <= le32_to_cpu(btree->u.external[i].file_secno)) { btree 463 fs/hpfs/anode.c else if (le32_to_cpu(btree->u.external[i].file_secno) + le32_to_cpu(btree->u.external[i].length) > secs) { btree 464 fs/hpfs/anode.c hpfs_free_sectors(s, le32_to_cpu(btree->u.external[i].disk_secno) + secs - btree 465 fs/hpfs/anode.c le32_to_cpu(btree->u.external[i].file_secno), le32_to_cpu(btree->u.external[i].length) btree 466 fs/hpfs/anode.c - secs + le32_to_cpu(btree->u.external[i].file_secno)); /* I hope gcc optimizes this :-) */ btree 467 fs/hpfs/anode.c btree->u.external[i].length = cpu_to_le32(secs - le32_to_cpu(btree->u.external[i].file_secno)); btree 469 fs/hpfs/anode.c for (j = i + 1; j < btree->n_used_nodes; j++) btree 470 fs/hpfs/anode.c hpfs_free_sectors(s, le32_to_cpu(btree->u.external[j].disk_secno), le32_to_cpu(btree->u.external[j].length)); btree 471 fs/hpfs/anode.c btree->n_used_nodes = i + 1; btree 472 fs/hpfs/anode.c btree->n_free_nodes = nodes - btree->n_used_nodes; btree 473 fs/hpfs/anode.c btree->first_free = cpu_to_le16(8 + 12 * btree->n_used_nodes); btree 488 fs/hpfs/anode.c if (!fnode_is_dir(fnode)) hpfs_remove_btree(s, &fnode->btree); btree 44 fs/hpfs/ea.c hpfs_remove_btree(s, &anode->btree); btree 52 fs/hpfs/file.c disk_secno = hpfs_bplus_lookup(inode->i_sb, inode, &fnode->btree, file_secno, bh); btree 455 fs/hpfs/hpfs.h struct bplus_header btree; /* b+ tree, 8 extents or 12 subtrees */ btree 497 fs/hpfs/hpfs.h struct bplus_header btree; /* b+tree, 40 extents or 60 subtrees */ btree 180 fs/hpfs/map.c if ((unsigned)fnode->btree.n_used_nodes + (unsigned)fnode->btree.n_free_nodes != btree 181 fs/hpfs/map.c (bp_internal(&fnode->btree) ? 12 : 8)) { btree 187 fs/hpfs/map.c if (le16_to_cpu(fnode->btree.first_free) != btree 188 fs/hpfs/map.c 8 + fnode->btree.n_used_nodes * (bp_internal(&fnode->btree) ? 8 : 12)) { btree 235 fs/hpfs/map.c if ((unsigned)anode->btree.n_used_nodes + (unsigned)anode->btree.n_free_nodes != btree 236 fs/hpfs/map.c (bp_internal(&anode->btree) ? 60 : 40)) { btree 240 fs/hpfs/map.c if (le16_to_cpu(anode->btree.first_free) != btree 241 fs/hpfs/map.c 8 + anode->btree.n_used_nodes * (bp_internal(&anode->btree) ? 8 : 12)) { btree 86 fs/hpfs/namei.c fnode->btree.n_free_nodes = 7; btree 87 fs/hpfs/namei.c fnode->btree.n_used_nodes = 1; btree 88 fs/hpfs/namei.c fnode->btree.first_free = cpu_to_le16(0x14); btree 58 fs/nilfs2/btree.c static int nilfs_btree_get_new_block(const struct nilfs_bmap *btree, btree 61 fs/nilfs2/btree.c struct address_space *btnc = &NILFS_BMAP_I(btree)->i_btnode_cache; btree 111 fs/nilfs2/btree.c static int nilfs_btree_node_size(const struct nilfs_bmap *btree) btree 113 fs/nilfs2/btree.c return i_blocksize(btree->b_inode); btree 116 fs/nilfs2/btree.c static int nilfs_btree_nchildren_per_block(const struct nilfs_bmap *btree) btree 118 fs/nilfs2/btree.c return btree->b_nchildren_per_block; btree 409 fs/nilfs2/btree.c nilfs_btree_get_root(const struct nilfs_bmap *btree) btree 411 fs/nilfs2/btree.c return (struct nilfs_btree_node *)btree->b_u.u_data; btree 426 fs/nilfs2/btree.c static int nilfs_btree_height(const struct nilfs_bmap *btree) btree 428 fs/nilfs2/btree.c return nilfs_btree_node_get_level(nilfs_btree_get_root(btree)) + 1; btree 432 fs/nilfs2/btree.c nilfs_btree_get_node(const struct nilfs_bmap *btree, btree 438 fs/nilfs2/btree.c if (level == nilfs_btree_height(btree) - 1) { btree 439 fs/nilfs2/btree.c node = nilfs_btree_get_root(btree); btree 443 fs/nilfs2/btree.c *ncmaxp = nilfs_btree_nchildren_per_block(btree); btree 448 fs/nilfs2/btree.c static int nilfs_btree_bad_node(const struct nilfs_bmap *btree, btree 453 fs/nilfs2/btree.c nilfs_msg(btree->b_inode->i_sb, KERN_CRIT, btree 455 fs/nilfs2/btree.c btree->b_inode->i_ino, btree 469 fs/nilfs2/btree.c static int __nilfs_btree_get_block(const struct nilfs_bmap *btree, __u64 ptr, btree 473 fs/nilfs2/btree.c struct address_space *btnc = &NILFS_BMAP_I(btree)->i_btnode_cache; btree 511 fs/nilfs2/btree.c nilfs_msg(btree->b_inode->i_sb, KERN_ERR, btree 513 fs/nilfs2/btree.c btree->b_inode->i_ino, (unsigned long long)ptr); btree 529 fs/nilfs2/btree.c static int nilfs_btree_get_block(const struct nilfs_bmap *btree, __u64 ptr, btree 532 fs/nilfs2/btree.c return __nilfs_btree_get_block(btree, ptr, bhp, NULL); btree 535 fs/nilfs2/btree.c static int nilfs_btree_do_lookup(const struct nilfs_bmap *btree, btree 545 fs/nilfs2/btree.c node = nilfs_btree_get_root(btree); btree 556 fs/nilfs2/btree.c ncmax = nilfs_btree_nchildren_per_block(btree); btree 561 fs/nilfs2/btree.c p.node = nilfs_btree_get_node(btree, path, level + 1, btree 567 fs/nilfs2/btree.c ret = __nilfs_btree_get_block(btree, ptr, &path[level].bp_bh, btree 573 fs/nilfs2/btree.c if (nilfs_btree_bad_node(btree, node, level)) btree 597 fs/nilfs2/btree.c static int nilfs_btree_do_lookup_last(const struct nilfs_bmap *btree, btree 605 fs/nilfs2/btree.c node = nilfs_btree_get_root(btree); btree 614 fs/nilfs2/btree.c ncmax = nilfs_btree_nchildren_per_block(btree); btree 617 fs/nilfs2/btree.c ret = nilfs_btree_get_block(btree, ptr, &path[level].bp_bh); btree 621 fs/nilfs2/btree.c if (nilfs_btree_bad_node(btree, node, level)) btree 646 fs/nilfs2/btree.c static int nilfs_btree_get_next_key(const struct nilfs_bmap *btree, btree 651 fs/nilfs2/btree.c int maxlevel = nilfs_btree_height(btree) - 1; btree 658 fs/nilfs2/btree.c node = nilfs_btree_get_root(btree); btree 674 fs/nilfs2/btree.c static int nilfs_btree_lookup(const struct nilfs_bmap *btree, btree 684 fs/nilfs2/btree.c ret = nilfs_btree_do_lookup(btree, path, key, ptrp, level, 0); btree 691 fs/nilfs2/btree.c static int nilfs_btree_lookup_contig(const struct nilfs_bmap *btree, btree 708 fs/nilfs2/btree.c ret = nilfs_btree_do_lookup(btree, path, key, &ptr, level, 1); btree 712 fs/nilfs2/btree.c if (NILFS_BMAP_USE_VBN(btree)) { btree 713 fs/nilfs2/btree.c dat = nilfs_bmap_get_dat(btree); btree 723 fs/nilfs2/btree.c maxlevel = nilfs_btree_height(btree) - 1; btree 724 fs/nilfs2/btree.c node = nilfs_btree_get_node(btree, path, level, &ncmax); btree 747 fs/nilfs2/btree.c p.node = nilfs_btree_get_node(btree, path, level + 1, &p.ncmax); btree 759 fs/nilfs2/btree.c ret = __nilfs_btree_get_block(btree, ptr2, &path[level].bp_bh, btree 764 fs/nilfs2/btree.c ncmax = nilfs_btree_nchildren_per_block(btree); btree 776 fs/nilfs2/btree.c static void nilfs_btree_promote_key(struct nilfs_bmap *btree, btree 780 fs/nilfs2/btree.c if (level < nilfs_btree_height(btree) - 1) { btree 788 fs/nilfs2/btree.c (++level < nilfs_btree_height(btree) - 1)); btree 792 fs/nilfs2/btree.c if (level == nilfs_btree_height(btree) - 1) { btree 793 fs/nilfs2/btree.c nilfs_btree_node_set_key(nilfs_btree_get_root(btree), btree 798 fs/nilfs2/btree.c static void nilfs_btree_do_insert(struct nilfs_bmap *btree, btree 805 fs/nilfs2/btree.c if (level < nilfs_btree_height(btree) - 1) { btree 807 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 814 fs/nilfs2/btree.c nilfs_btree_promote_key(btree, path, level + 1, btree 818 fs/nilfs2/btree.c node = nilfs_btree_get_root(btree); btree 825 fs/nilfs2/btree.c static void nilfs_btree_carry_left(struct nilfs_bmap *btree, btree 836 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 853 fs/nilfs2/btree.c nilfs_btree_promote_key(btree, path, level + 1, btree 868 fs/nilfs2/btree.c nilfs_btree_do_insert(btree, path, level, keyp, ptrp); btree 871 fs/nilfs2/btree.c static void nilfs_btree_carry_right(struct nilfs_bmap *btree, btree 882 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 900 fs/nilfs2/btree.c nilfs_btree_promote_key(btree, path, level + 1, btree 915 fs/nilfs2/btree.c nilfs_btree_do_insert(btree, path, level, keyp, ptrp); btree 918 fs/nilfs2/btree.c static void nilfs_btree_split(struct nilfs_bmap *btree, btree 928 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 956 fs/nilfs2/btree.c nilfs_btree_do_insert(btree, path, level, keyp, ptrp); btree 968 fs/nilfs2/btree.c static void nilfs_btree_grow(struct nilfs_bmap *btree, btree 975 fs/nilfs2/btree.c root = nilfs_btree_get_root(btree); btree 977 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 991 fs/nilfs2/btree.c nilfs_btree_do_insert(btree, path, level, keyp, ptrp); btree 997 fs/nilfs2/btree.c static __u64 nilfs_btree_find_near(const struct nilfs_bmap *btree, btree 1009 fs/nilfs2/btree.c node = nilfs_btree_get_node(btree, path, level, &ncmax); btree 1017 fs/nilfs2/btree.c if (level <= nilfs_btree_height(btree) - 1) { btree 1018 fs/nilfs2/btree.c node = nilfs_btree_get_node(btree, path, level, &ncmax); btree 1026 fs/nilfs2/btree.c static __u64 nilfs_btree_find_target_v(const struct nilfs_bmap *btree, btree 1032 fs/nilfs2/btree.c ptr = nilfs_bmap_find_target_seq(btree, key); btree 1037 fs/nilfs2/btree.c ptr = nilfs_btree_find_near(btree, path); btree 1043 fs/nilfs2/btree.c return nilfs_bmap_find_target_in_group(btree); btree 1046 fs/nilfs2/btree.c static int nilfs_btree_prepare_insert(struct nilfs_bmap *btree, btree 1061 fs/nilfs2/btree.c if (NILFS_BMAP_USE_VBN(btree)) { btree 1063 fs/nilfs2/btree.c nilfs_btree_find_target_v(btree, path, key); btree 1064 fs/nilfs2/btree.c dat = nilfs_bmap_get_dat(btree); btree 1067 fs/nilfs2/btree.c ret = nilfs_bmap_prepare_alloc_ptr(btree, &path[level].bp_newreq, dat); btree 1071 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 1074 fs/nilfs2/btree.c level < nilfs_btree_height(btree) - 1; btree 1083 fs/nilfs2/btree.c parent = nilfs_btree_get_node(btree, path, level + 1, &ncmax); btree 1090 fs/nilfs2/btree.c ret = nilfs_btree_get_block(btree, sibptr, &bh); btree 1108 fs/nilfs2/btree.c ret = nilfs_btree_get_block(btree, sibptr, &bh); btree 1125 fs/nilfs2/btree.c ret = nilfs_bmap_prepare_alloc_ptr(btree, btree 1129 fs/nilfs2/btree.c ret = nilfs_btree_get_new_block(btree, btree 1144 fs/nilfs2/btree.c node = nilfs_btree_get_root(btree); btree 1154 fs/nilfs2/btree.c ret = nilfs_bmap_prepare_alloc_ptr(btree, &path[level].bp_newreq, dat); btree 1157 fs/nilfs2/btree.c ret = nilfs_btree_get_new_block(btree, path[level].bp_newreq.bpr_ptr, btree 1180 fs/nilfs2/btree.c nilfs_bmap_abort_alloc_ptr(btree, &path[level].bp_newreq, dat); btree 1184 fs/nilfs2/btree.c nilfs_bmap_abort_alloc_ptr(btree, &path[level].bp_newreq, dat); btree 1188 fs/nilfs2/btree.c nilfs_bmap_abort_alloc_ptr(btree, &path[level].bp_newreq, dat); btree 1195 fs/nilfs2/btree.c static void nilfs_btree_commit_insert(struct nilfs_bmap *btree, btree 1204 fs/nilfs2/btree.c if (NILFS_BMAP_USE_VBN(btree)) { btree 1205 fs/nilfs2/btree.c nilfs_bmap_set_target_v(btree, key, ptr); btree 1206 fs/nilfs2/btree.c dat = nilfs_bmap_get_dat(btree); btree 1210 fs/nilfs2/btree.c nilfs_bmap_commit_alloc_ptr(btree, btree 1212 fs/nilfs2/btree.c path[level].bp_op(btree, path, level, &key, &ptr); btree 1215 fs/nilfs2/btree.c if (!nilfs_bmap_dirty(btree)) btree 1216 fs/nilfs2/btree.c nilfs_bmap_set_dirty(btree); btree 1219 fs/nilfs2/btree.c static int nilfs_btree_insert(struct nilfs_bmap *btree, __u64 key, __u64 ptr) btree 1229 fs/nilfs2/btree.c ret = nilfs_btree_do_lookup(btree, path, key, NULL, btree 1237 fs/nilfs2/btree.c ret = nilfs_btree_prepare_insert(btree, path, &level, key, ptr, &stats); btree 1240 fs/nilfs2/btree.c nilfs_btree_commit_insert(btree, path, level, key, ptr); btree 1241 fs/nilfs2/btree.c nilfs_inode_add_blocks(btree->b_inode, stats.bs_nblocks); btree 1248 fs/nilfs2/btree.c static void nilfs_btree_do_delete(struct nilfs_bmap *btree, btree 1255 fs/nilfs2/btree.c if (level < nilfs_btree_height(btree) - 1) { btree 1257 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 1263 fs/nilfs2/btree.c nilfs_btree_promote_key(btree, path, level + 1, btree 1266 fs/nilfs2/btree.c node = nilfs_btree_get_root(btree); btree 1273 fs/nilfs2/btree.c static void nilfs_btree_borrow_left(struct nilfs_bmap *btree, btree 1280 fs/nilfs2/btree.c nilfs_btree_do_delete(btree, path, level, keyp, ptrp); btree 1286 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 1297 fs/nilfs2/btree.c nilfs_btree_promote_key(btree, path, level + 1, btree 1305 fs/nilfs2/btree.c static void nilfs_btree_borrow_right(struct nilfs_bmap *btree, btree 1312 fs/nilfs2/btree.c nilfs_btree_do_delete(btree, path, level, keyp, ptrp); btree 1318 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 1330 fs/nilfs2/btree.c nilfs_btree_promote_key(btree, path, level + 1, btree 1338 fs/nilfs2/btree.c static void nilfs_btree_concat_left(struct nilfs_bmap *btree, btree 1345 fs/nilfs2/btree.c nilfs_btree_do_delete(btree, path, level, keyp, ptrp); btree 1349 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 1364 fs/nilfs2/btree.c static void nilfs_btree_concat_right(struct nilfs_bmap *btree, btree 1371 fs/nilfs2/btree.c nilfs_btree_do_delete(btree, path, level, keyp, ptrp); btree 1375 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 1389 fs/nilfs2/btree.c static void nilfs_btree_shrink(struct nilfs_bmap *btree, btree 1396 fs/nilfs2/btree.c nilfs_btree_do_delete(btree, path, level, keyp, ptrp); btree 1398 fs/nilfs2/btree.c root = nilfs_btree_get_root(btree); btree 1400 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 1413 fs/nilfs2/btree.c static void nilfs_btree_nop(struct nilfs_bmap *btree, btree 1419 fs/nilfs2/btree.c static int nilfs_btree_prepare_delete(struct nilfs_bmap *btree, btree 1432 fs/nilfs2/btree.c ncmin = NILFS_BTREE_NODE_NCHILDREN_MIN(nilfs_btree_node_size(btree)); btree 1433 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 1436 fs/nilfs2/btree.c level < nilfs_btree_height(btree) - 1; btree 1441 fs/nilfs2/btree.c ret = nilfs_bmap_prepare_end_ptr(btree, btree 1452 fs/nilfs2/btree.c parent = nilfs_btree_get_node(btree, path, level + 1, &ncmax); btree 1460 fs/nilfs2/btree.c ret = nilfs_btree_get_block(btree, sibptr, &bh); btree 1480 fs/nilfs2/btree.c ret = nilfs_btree_get_block(btree, sibptr, &bh); btree 1506 fs/nilfs2/btree.c WARN_ON(level != nilfs_btree_height(btree) - 2); btree 1527 fs/nilfs2/btree.c node = nilfs_btree_get_root(btree); btree 1532 fs/nilfs2/btree.c ret = nilfs_bmap_prepare_end_ptr(btree, &path[level].bp_oldreq, dat); btree 1543 fs/nilfs2/btree.c nilfs_bmap_abort_end_ptr(btree, &path[level].bp_oldreq, dat); btree 1547 fs/nilfs2/btree.c nilfs_bmap_abort_end_ptr(btree, &path[level].bp_oldreq, dat); btree 1554 fs/nilfs2/btree.c static void nilfs_btree_commit_delete(struct nilfs_bmap *btree, btree 1561 fs/nilfs2/btree.c nilfs_bmap_commit_end_ptr(btree, &path[level].bp_oldreq, dat); btree 1562 fs/nilfs2/btree.c path[level].bp_op(btree, path, level, NULL, NULL); btree 1565 fs/nilfs2/btree.c if (!nilfs_bmap_dirty(btree)) btree 1566 fs/nilfs2/btree.c nilfs_bmap_set_dirty(btree); btree 1569 fs/nilfs2/btree.c static int nilfs_btree_delete(struct nilfs_bmap *btree, __u64 key) btree 1581 fs/nilfs2/btree.c ret = nilfs_btree_do_lookup(btree, path, key, NULL, btree 1587 fs/nilfs2/btree.c dat = NILFS_BMAP_USE_VBN(btree) ? nilfs_bmap_get_dat(btree) : NULL; btree 1589 fs/nilfs2/btree.c ret = nilfs_btree_prepare_delete(btree, path, &level, &stats, dat); btree 1592 fs/nilfs2/btree.c nilfs_btree_commit_delete(btree, path, level, dat); btree 1593 fs/nilfs2/btree.c nilfs_inode_sub_blocks(btree->b_inode, stats.bs_nblocks); btree 1600 fs/nilfs2/btree.c static int nilfs_btree_seek_key(const struct nilfs_bmap *btree, __u64 start, btree 1611 fs/nilfs2/btree.c ret = nilfs_btree_do_lookup(btree, path, start, NULL, minlevel, 0); btree 1615 fs/nilfs2/btree.c ret = nilfs_btree_get_next_key(btree, path, minlevel, keyp); btree 1621 fs/nilfs2/btree.c static int nilfs_btree_last_key(const struct nilfs_bmap *btree, __u64 *keyp) btree 1630 fs/nilfs2/btree.c ret = nilfs_btree_do_lookup_last(btree, path, keyp, NULL); btree 1637 fs/nilfs2/btree.c static int nilfs_btree_check_delete(struct nilfs_bmap *btree, __u64 key) btree 1645 fs/nilfs2/btree.c root = nilfs_btree_get_root(btree); btree 1646 fs/nilfs2/btree.c switch (nilfs_btree_height(btree)) { btree 1657 fs/nilfs2/btree.c ret = nilfs_btree_get_block(btree, ptr, &bh); btree 1676 fs/nilfs2/btree.c static int nilfs_btree_gather_data(struct nilfs_bmap *btree, btree 1686 fs/nilfs2/btree.c root = nilfs_btree_get_root(btree); btree 1687 fs/nilfs2/btree.c switch (nilfs_btree_height(btree)) { btree 1698 fs/nilfs2/btree.c ret = nilfs_btree_get_block(btree, ptr, &bh); btree 1702 fs/nilfs2/btree.c ncmax = nilfs_btree_nchildren_per_block(btree); btree 1726 fs/nilfs2/btree.c nilfs_btree_prepare_convert_and_insert(struct nilfs_bmap *btree, __u64 key, btree 1740 fs/nilfs2/btree.c if (NILFS_BMAP_USE_VBN(btree)) { btree 1741 fs/nilfs2/btree.c dreq->bpr_ptr = nilfs_btree_find_target_v(btree, NULL, key); btree 1742 fs/nilfs2/btree.c dat = nilfs_bmap_get_dat(btree); btree 1745 fs/nilfs2/btree.c ret = nilfs_bmap_prepare_alloc_ptr(btree, dreq, dat); btree 1753 fs/nilfs2/btree.c ret = nilfs_bmap_prepare_alloc_ptr(btree, nreq, dat); btree 1757 fs/nilfs2/btree.c ret = nilfs_btree_get_new_block(btree, nreq->bpr_ptr, &bh); btree 1770 fs/nilfs2/btree.c nilfs_bmap_abort_alloc_ptr(btree, nreq, dat); btree 1772 fs/nilfs2/btree.c nilfs_bmap_abort_alloc_ptr(btree, dreq, dat); btree 1779 fs/nilfs2/btree.c nilfs_btree_commit_convert_and_insert(struct nilfs_bmap *btree, btree 1793 fs/nilfs2/btree.c if (btree->b_ops->bop_clear != NULL) btree 1794 fs/nilfs2/btree.c btree->b_ops->bop_clear(btree); btree 1800 fs/nilfs2/btree.c dat = NILFS_BMAP_USE_VBN(btree) ? nilfs_bmap_get_dat(btree) : NULL; btree 1801 fs/nilfs2/btree.c __nilfs_btree_init(btree); btree 1803 fs/nilfs2/btree.c nilfs_bmap_commit_alloc_ptr(btree, dreq, dat); btree 1804 fs/nilfs2/btree.c nilfs_bmap_commit_alloc_ptr(btree, nreq, dat); btree 1808 fs/nilfs2/btree.c ncblk = nilfs_btree_nchildren_per_block(btree); btree 1813 fs/nilfs2/btree.c if (!nilfs_bmap_dirty(btree)) btree 1814 fs/nilfs2/btree.c nilfs_bmap_set_dirty(btree); btree 1819 fs/nilfs2/btree.c node = nilfs_btree_get_root(btree); btree 1825 fs/nilfs2/btree.c nilfs_bmap_commit_alloc_ptr(btree, dreq, dat); btree 1828 fs/nilfs2/btree.c node = nilfs_btree_get_root(btree); btree 1834 fs/nilfs2/btree.c if (!nilfs_bmap_dirty(btree)) btree 1835 fs/nilfs2/btree.c nilfs_bmap_set_dirty(btree); btree 1838 fs/nilfs2/btree.c if (NILFS_BMAP_USE_VBN(btree)) btree 1839 fs/nilfs2/btree.c nilfs_bmap_set_target_v(btree, key, dreq->bpr_ptr); btree 1851 fs/nilfs2/btree.c int nilfs_btree_convert_and_insert(struct nilfs_bmap *btree, btree 1864 fs/nilfs2/btree.c nilfs_btree_node_size(btree))) { btree 1873 fs/nilfs2/btree.c ret = nilfs_btree_prepare_convert_and_insert(btree, key, di, ni, &bh, btree 1877 fs/nilfs2/btree.c nilfs_btree_commit_convert_and_insert(btree, key, ptr, keys, ptrs, n, btree 1879 fs/nilfs2/btree.c nilfs_inode_add_blocks(btree->b_inode, stats.bs_nblocks); btree 1883 fs/nilfs2/btree.c static int nilfs_btree_propagate_p(struct nilfs_bmap *btree, btree 1888 fs/nilfs2/btree.c while ((++level < nilfs_btree_height(btree) - 1) && btree 1895 fs/nilfs2/btree.c static int nilfs_btree_prepare_update_v(struct nilfs_bmap *btree, btree 1902 fs/nilfs2/btree.c parent = nilfs_btree_get_node(btree, path, level + 1, &ncmax); btree 1917 fs/nilfs2/btree.c &NILFS_BMAP_I(btree)->i_btnode_cache, btree 1930 fs/nilfs2/btree.c static void nilfs_btree_commit_update_v(struct nilfs_bmap *btree, btree 1939 fs/nilfs2/btree.c btree->b_ptr_type == NILFS_BMAP_PTR_VS); btree 1943 fs/nilfs2/btree.c &NILFS_BMAP_I(btree)->i_btnode_cache, btree 1949 fs/nilfs2/btree.c parent = nilfs_btree_get_node(btree, path, level + 1, &ncmax); btree 1954 fs/nilfs2/btree.c static void nilfs_btree_abort_update_v(struct nilfs_bmap *btree, btree 1962 fs/nilfs2/btree.c &NILFS_BMAP_I(btree)->i_btnode_cache, btree 1966 fs/nilfs2/btree.c static int nilfs_btree_prepare_propagate_v(struct nilfs_bmap *btree, btree 1975 fs/nilfs2/btree.c ret = nilfs_btree_prepare_update_v(btree, path, level, dat); btree 1979 fs/nilfs2/btree.c while ((++level < nilfs_btree_height(btree) - 1) && btree 1983 fs/nilfs2/btree.c ret = nilfs_btree_prepare_update_v(btree, path, level, dat); btree 1995 fs/nilfs2/btree.c nilfs_btree_abort_update_v(btree, path, level, dat); btree 1997 fs/nilfs2/btree.c nilfs_btree_abort_update_v(btree, path, level, dat); btree 2001 fs/nilfs2/btree.c static void nilfs_btree_commit_propagate_v(struct nilfs_bmap *btree, btree 2010 fs/nilfs2/btree.c nilfs_btree_commit_update_v(btree, path, minlevel, dat); btree 2013 fs/nilfs2/btree.c nilfs_btree_commit_update_v(btree, path, level, dat); btree 2016 fs/nilfs2/btree.c static int nilfs_btree_propagate_v(struct nilfs_bmap *btree, btree 2022 fs/nilfs2/btree.c struct inode *dat = nilfs_bmap_get_dat(btree); btree 2028 fs/nilfs2/btree.c ret = nilfs_btree_prepare_propagate_v(btree, path, level, &maxlevel, btree 2034 fs/nilfs2/btree.c parent = nilfs_btree_get_node(btree, path, level + 1, &ncmax); btree 2043 fs/nilfs2/btree.c nilfs_btree_commit_propagate_v(btree, path, level, maxlevel, bh, dat); btree 2051 fs/nilfs2/btree.c static int nilfs_btree_propagate(struct nilfs_bmap *btree, btree 2070 fs/nilfs2/btree.c key = nilfs_bmap_data_get_key(btree, bh); btree 2074 fs/nilfs2/btree.c ret = nilfs_btree_do_lookup(btree, path, key, NULL, level + 1, 0); btree 2077 fs/nilfs2/btree.c nilfs_msg(btree->b_inode->i_sb, KERN_CRIT, btree 2079 fs/nilfs2/btree.c btree->b_inode->i_ino, btree 2084 fs/nilfs2/btree.c ret = NILFS_BMAP_USE_VBN(btree) ? btree 2085 fs/nilfs2/btree.c nilfs_btree_propagate_v(btree, path, level, bh) : btree 2086 fs/nilfs2/btree.c nilfs_btree_propagate_p(btree, path, level, bh); btree 2094 fs/nilfs2/btree.c static int nilfs_btree_propagate_gc(struct nilfs_bmap *btree, btree 2097 fs/nilfs2/btree.c return nilfs_dat_mark_dirty(nilfs_bmap_get_dat(btree), bh->b_blocknr); btree 2100 fs/nilfs2/btree.c static void nilfs_btree_add_dirty_buffer(struct nilfs_bmap *btree, btree 2117 fs/nilfs2/btree.c nilfs_msg(btree->b_inode->i_sb, KERN_WARNING, btree 2120 fs/nilfs2/btree.c btree->b_inode->i_ino, btree 2135 fs/nilfs2/btree.c static void nilfs_btree_lookup_dirty_buffers(struct nilfs_bmap *btree, btree 2138 fs/nilfs2/btree.c struct address_space *btcache = &NILFS_BMAP_I(btree)->i_btnode_cache; btree 2158 fs/nilfs2/btree.c nilfs_btree_add_dirty_buffer(btree, btree 2172 fs/nilfs2/btree.c static int nilfs_btree_assign_p(struct nilfs_bmap *btree, btree 2184 fs/nilfs2/btree.c parent = nilfs_btree_get_node(btree, path, level + 1, &ncmax); btree 2192 fs/nilfs2/btree.c &NILFS_BMAP_I(btree)->i_btnode_cache, btree 2197 fs/nilfs2/btree.c &NILFS_BMAP_I(btree)->i_btnode_cache, btree 2213 fs/nilfs2/btree.c static int nilfs_btree_assign_v(struct nilfs_bmap *btree, btree 2221 fs/nilfs2/btree.c struct inode *dat = nilfs_bmap_get_dat(btree); btree 2227 fs/nilfs2/btree.c parent = nilfs_btree_get_node(btree, path, level + 1, &ncmax); btree 2244 fs/nilfs2/btree.c static int nilfs_btree_assign(struct nilfs_bmap *btree, btree 2263 fs/nilfs2/btree.c key = nilfs_bmap_data_get_key(btree, *bh); btree 2267 fs/nilfs2/btree.c ret = nilfs_btree_do_lookup(btree, path, key, NULL, level + 1, 0); btree 2273 fs/nilfs2/btree.c ret = NILFS_BMAP_USE_VBN(btree) ? btree 2274 fs/nilfs2/btree.c nilfs_btree_assign_v(btree, path, level, bh, blocknr, binfo) : btree 2275 fs/nilfs2/btree.c nilfs_btree_assign_p(btree, path, level, bh, blocknr, binfo); btree 2283 fs/nilfs2/btree.c static int nilfs_btree_assign_gc(struct nilfs_bmap *btree, btree 2292 fs/nilfs2/btree.c ret = nilfs_dat_move(nilfs_bmap_get_dat(btree), (*bh)->b_blocknr, btree 2301 fs/nilfs2/btree.c key = nilfs_bmap_data_get_key(btree, *bh); btree 2310 fs/nilfs2/btree.c static int nilfs_btree_mark(struct nilfs_bmap *btree, __u64 key, int level) btree 2321 fs/nilfs2/btree.c ret = nilfs_btree_do_lookup(btree, path, key, &ptr, level + 1, 0); btree 2326 fs/nilfs2/btree.c ret = nilfs_btree_get_block(btree, ptr, &bh); btree 2335 fs/nilfs2/btree.c if (!nilfs_bmap_dirty(btree)) btree 2336 fs/nilfs2/btree.c nilfs_bmap_set_dirty(btree); btree 1083 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_da_node_entry *btree; btree 1124 fs/xfs/libxfs/xfs_attr_leaf.c btree = dp->d_ops->node_tree_p(node); btree 1131 fs/xfs/libxfs/xfs_attr_leaf.c btree[0].hashval = entries[icleafhdr.count - 1].hashval; btree 1132 fs/xfs/libxfs/xfs_attr_leaf.c btree[0].before = cpu_to_be32(blkno); btree 546 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da_node_entry *btree; btree 581 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(oldroot); btree 582 fs/xfs/libxfs/xfs_da_btree.c size = (int)((char *)&btree[icnodehdr.count] - (char *)oldroot); btree 641 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(node); btree 642 fs/xfs/libxfs/xfs_da_btree.c btree[0].hashval = cpu_to_be32(blk1->hashval); btree 643 fs/xfs/libxfs/xfs_da_btree.c btree[0].before = cpu_to_be32(blk1->blkno); btree 644 fs/xfs/libxfs/xfs_da_btree.c btree[1].hashval = cpu_to_be32(blk2->hashval); btree 645 fs/xfs/libxfs/xfs_da_btree.c btree[1].before = cpu_to_be32(blk2->blkno); btree 661 fs/xfs/libxfs/xfs_da_btree.c XFS_DA_LOGRANGE(node, btree, sizeof(xfs_da_node_entry_t) * 2)); btree 917 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da_node_entry *btree; btree 925 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(node); btree 938 fs/xfs/libxfs/xfs_da_btree.c tmp = (nodehdr.count - oldblk->index) * (uint)sizeof(*btree); btree 939 fs/xfs/libxfs/xfs_da_btree.c memmove(&btree[oldblk->index + 1], &btree[oldblk->index], tmp); btree 941 fs/xfs/libxfs/xfs_da_btree.c btree[oldblk->index].hashval = cpu_to_be32(newblk->hashval); btree 942 fs/xfs/libxfs/xfs_da_btree.c btree[oldblk->index].before = cpu_to_be32(newblk->blkno); btree 944 fs/xfs/libxfs/xfs_da_btree.c XFS_DA_LOGRANGE(node, &btree[oldblk->index], btree 945 fs/xfs/libxfs/xfs_da_btree.c tmp + sizeof(*btree))); btree 955 fs/xfs/libxfs/xfs_da_btree.c oldblk->hashval = be32_to_cpu(btree[nodehdr.count - 1].hashval); btree 1085 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da_node_entry *btree; btree 1109 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(oldroot); btree 1110 fs/xfs/libxfs/xfs_da_btree.c child = be32_to_cpu(btree[0].before); btree 1276 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da_node_entry *btree; btree 1285 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(node); btree 1286 fs/xfs/libxfs/xfs_da_btree.c return be32_to_cpu(btree[nodehdr.count - 1].hashval); btree 1300 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da_node_entry *btree; btree 1332 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(node); btree 1333 fs/xfs/libxfs/xfs_da_btree.c if (be32_to_cpu(btree[blk->index].hashval) == lasthash) btree 1336 fs/xfs/libxfs/xfs_da_btree.c btree[blk->index].hashval = cpu_to_be32(lasthash); btree 1338 fs/xfs/libxfs/xfs_da_btree.c XFS_DA_LOGRANGE(node, &btree[blk->index], btree 1339 fs/xfs/libxfs/xfs_da_btree.c sizeof(*btree))); btree 1341 fs/xfs/libxfs/xfs_da_btree.c lasthash = be32_to_cpu(btree[nodehdr.count - 1].hashval); btree 1355 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da_node_entry *btree; btree 1371 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(node); btree 1375 fs/xfs/libxfs/xfs_da_btree.c memmove(&btree[index], &btree[index + 1], tmp); btree 1377 fs/xfs/libxfs/xfs_da_btree.c XFS_DA_LOGRANGE(node, &btree[index], tmp)); btree 1380 fs/xfs/libxfs/xfs_da_btree.c memset(&btree[index], 0, sizeof(xfs_da_node_entry_t)); btree 1382 fs/xfs/libxfs/xfs_da_btree.c XFS_DA_LOGRANGE(node, &btree[index], sizeof(btree[index]))); btree 1391 fs/xfs/libxfs/xfs_da_btree.c drop_blk->hashval = be32_to_cpu(btree[index - 1].hashval); btree 1490 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da_node_entry *btree; btree 1554 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(node); btree 1569 fs/xfs/libxfs/xfs_da_btree.c blk->hashval = be32_to_cpu(btree[max - 1].hashval); btree 1578 fs/xfs/libxfs/xfs_da_btree.c btreehashval = be32_to_cpu(btree[probe].hashval); btree 1588 fs/xfs/libxfs/xfs_da_btree.c (be32_to_cpu(btree[probe].hashval) == hashval)); btree 1595 fs/xfs/libxfs/xfs_da_btree.c be32_to_cpu(btree[probe].hashval) >= hashval) { btree 1599 fs/xfs/libxfs/xfs_da_btree.c be32_to_cpu(btree[probe].hashval) < hashval) { btree 1608 fs/xfs/libxfs/xfs_da_btree.c blkno = be32_to_cpu(btree[max - 1].before); btree 1611 fs/xfs/libxfs/xfs_da_btree.c blkno = be32_to_cpu(btree[probe].before); btree 1883 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da_node_entry *btree; btree 1906 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(node); btree 1910 fs/xfs/libxfs/xfs_da_btree.c blkno = be32_to_cpu(btree[blk->index].before); btree 1914 fs/xfs/libxfs/xfs_da_btree.c blkno = be32_to_cpu(btree[blk->index].before); btree 1967 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(node); btree 1968 fs/xfs/libxfs/xfs_da_btree.c blk->hashval = be32_to_cpu(btree[nodehdr.count - 1].hashval); btree 1973 fs/xfs/libxfs/xfs_da_btree.c blkno = be32_to_cpu(btree[blk->index].before); btree 2182 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da_node_entry *btree; btree 2252 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(dead_node); btree 2254 fs/xfs/libxfs/xfs_da_btree.c dead_hash = be32_to_cpu(btree[deadhdr.count - 1].hashval); btree 2319 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(par_node); btree 2322 fs/xfs/libxfs/xfs_da_btree.c be32_to_cpu(btree[entno].hashval) < dead_hash; btree 2331 fs/xfs/libxfs/xfs_da_btree.c par_blkno = be32_to_cpu(btree[entno].before); btree 2344 fs/xfs/libxfs/xfs_da_btree.c be32_to_cpu(btree[entno].before) != last_blkno; btree 2369 fs/xfs/libxfs/xfs_da_btree.c btree = dp->d_ops->node_tree_p(par_node); btree 2375 fs/xfs/libxfs/xfs_da_btree.c btree[entno].before = cpu_to_be32(dead_blkno); btree 2377 fs/xfs/libxfs/xfs_da_btree.c XFS_DA_LOGRANGE(par_node, &btree[entno].before, btree 2378 fs/xfs/libxfs/xfs_da_btree.c sizeof(btree[entno].before))); btree 860 fs/xfs/libxfs/xfs_sb.c uint64_t btree = 0; btree 882 fs/xfs/libxfs/xfs_sb.c btree += pag->pagf_btreeblks; btree 885 fs/xfs/libxfs/xfs_sb.c fdblocks = bfree + bfreelst + btree; btree 334 fs/xfs/scrub/dabtree.c struct xfs_da_node_entry *btree; btree 437 fs/xfs/scrub/dabtree.c btree = ip->d_ops->node_tree_p(node); btree 439 fs/xfs/scrub/dabtree.c blk->hashval = be32_to_cpu(btree[*pmaxrecs - 1].hashval); btree 204 fs/xfs/xfs_attr_inactive.c struct xfs_da_node_entry *btree; btree 222 fs/xfs/xfs_attr_inactive.c btree = dp->d_ops->node_tree_p(node); btree 223 fs/xfs/xfs_attr_inactive.c child_fsb = be32_to_cpu(btree[0].before); btree 287 fs/xfs/xfs_attr_inactive.c btree = dp->d_ops->node_tree_p(node); btree 288 fs/xfs/xfs_attr_inactive.c child_fsb = be32_to_cpu(btree[i + 1].before); btree 203 fs/xfs/xfs_attr_list.c struct xfs_da_node_entry *btree; btree 246 fs/xfs/xfs_attr_list.c btree = dp->d_ops->node_tree_p(node); btree 247 fs/xfs/xfs_attr_list.c for (i = 0; i < nodehdr.count; btree++, i++) { btree 248 fs/xfs/xfs_attr_list.c if (cursor->hashval <= be32_to_cpu(btree->hashval)) { btree 249 fs/xfs/xfs_attr_list.c cursor->blkno = be32_to_cpu(btree->before); btree 251 fs/xfs/xfs_attr_list.c btree); btree 164 fs/xfs/xfs_trace.h struct xfs_da_node_entry *btree), btree 165 fs/xfs/xfs_trace.h TP_ARGS(ctx, btree), btree 192 fs/xfs/xfs_trace.h __entry->bt_hashval = be32_to_cpu(btree->hashval); btree 193 fs/xfs/xfs_trace.h __entry->bt_before = be32_to_cpu(btree->before); btree 64 include/trace/events/bcache.h TP_PROTO(struct btree *b), btree 258 include/trace/events/bcache.h TP_PROTO(struct btree *b), btree 263 include/trace/events/bcache.h TP_PROTO(struct btree *b), btree 282 include/trace/events/bcache.h TP_PROTO(struct btree *b), btree 292 include/trace/events/bcache.h TP_PROTO(struct btree *b), btree 332 include/trace/events/bcache.h TP_PROTO(struct btree *b, struct bkey *k, unsigned op, unsigned status), btree 365 include/trace/events/bcache.h TP_PROTO(struct btree *b, unsigned keys), btree 382 include/trace/events/bcache.h TP_PROTO(struct btree *b, unsigned keys), btree 387 include/trace/events/bcache.h TP_PROTO(struct btree *b, unsigned keys), btree 392 include/trace/events/bcache.h TP_PROTO(struct btree *b),