Lines Matching refs:block
184 static int btree_write_alias(struct super_block *sb, struct logfs_block *block, in btree_write_alias() argument
190 list_for_each_entry(item, &block->item_list, list) { in btree_write_alias()
191 err = write_alias_journal(sb, block->ino, block->bix, in btree_write_alias()
192 block->level, item->child_no, item->val); in btree_write_alias()
209 struct logfs_block *block; in logfs_load_object_aliases() local
234 block = alias_tree_lookup(sb, ino, bix, level); in logfs_load_object_aliases()
235 if (!block) { in logfs_load_object_aliases()
236 block = __alloc_block(sb, ino, bix, level); in logfs_load_object_aliases()
237 block->ops = &btree_block_ops; in logfs_load_object_aliases()
238 err = alias_tree_insert(sb, ino, bix, level, block); in logfs_load_object_aliases()
241 if (test_and_set_bit(item->child_no, block->alias_map)) { in logfs_load_object_aliases()
245 list_move_tail(&block->alias_list, &super->s_object_alias); in logfs_load_object_aliases()
246 list_add(&item->list, &block->item_list); in logfs_load_object_aliases()
254 struct logfs_block *block = _block; in kill_alias() local
255 struct super_block *sb = block->sb; in kill_alias()
259 while (!list_empty(&block->item_list)) { in kill_alias()
260 item = list_entry(block->item_list.next, typeof(*item), list); in kill_alias()
264 block->ops->free_block(sb, block); in kill_alias()
480 struct logfs_block *block; in move_btree_to_page() local
486 block = btree_remove128(head, inode->i_ino, page->index); in move_btree_to_page()
487 if (!block) in move_btree_to_page()
491 block->ino, block->bix, block->level); in move_btree_to_page()
492 list_for_each_entry_safe(item, next, &block->item_list, list) { in move_btree_to_page()
497 block->page = page; in move_btree_to_page()
502 set_page_private(page, (unsigned long) block); in move_btree_to_page()
504 block->ops = &indirect_block_ops; in move_btree_to_page()
505 initialize_block_counters(page, block, data, 0); in move_btree_to_page()
521 struct logfs_block *block = logfs_block(page); in move_page_to_btree() local
522 struct super_block *sb = block->sb; in move_page_to_btree()
530 block->ops->free_block(sb, block); in move_page_to_btree()
534 block->ino, block->bix, block->level); in move_page_to_btree()
538 pos = fnb(block->alias_map, LOGFS_BLOCK_FACTOR, pos); in move_page_to_btree()
550 list_add(&item->list, &block->item_list); in move_page_to_btree()
552 block->page = NULL; in move_page_to_btree()
559 block->ops = &btree_block_ops; in move_page_to_btree()
560 err = alias_tree_insert(block->sb, block->ino, block->bix, block->level, in move_page_to_btree()
561 block); in move_page_to_btree()