Lines Matching defs:btnc
38 void nilfs_btnode_cache_init_once(struct address_space *btnc)
40 memset(btnc, 0, sizeof(*btnc));
41 INIT_RADIX_TREE(&btnc->page_tree, GFP_ATOMIC);
42 spin_lock_init(&btnc->tree_lock);
43 INIT_LIST_HEAD(&btnc->private_list);
44 spin_lock_init(&btnc->private_lock);
46 spin_lock_init(&btnc->i_mmap_lock);
47 INIT_RAW_PRIO_TREE_ROOT(&btnc->i_mmap);
48 INIT_LIST_HEAD(&btnc->i_mmap_nonlinear);
55 void nilfs_btnode_cache_init(struct address_space *btnc,
58 btnc->host = NULL; /* can safely set to host inode ? */
59 btnc->flags = 0;
60 mapping_set_gfp_mask(btnc, GFP_NOFS);
61 btnc->assoc_mapping = NULL;
62 btnc->backing_dev_info = bdi;
63 btnc->a_ops = &def_btnode_aops;
66 void nilfs_btnode_cache_clear(struct address_space *btnc)
68 invalidate_mapping_pages(btnc, 0, -1);
69 truncate_inode_pages(btnc, 0);
73 nilfs_btnode_create_block(struct address_space *btnc, __u64 blocknr)
75 struct inode *inode = NILFS_BTNC_I(btnc);
78 bh = nilfs_grab_buffer(inode, btnc, blocknr, 1 << BH_NILFS_Node);
98 int nilfs_btnode_submit_block(struct address_space *btnc, __u64 blocknr,
103 struct inode *inode = NILFS_BTNC_I(btnc);
107 bh = nilfs_grab_buffer(inode, btnc, blocknr, 1 << BH_NILFS_Node);
199 int nilfs_btnode_prepare_change_key(struct address_space *btnc,
203 struct inode *inode = NILFS_BTNC_I(btnc);
230 spin_lock_irq(&btnc->tree_lock);
231 err = radix_tree_insert(&btnc->page_tree, newkey, obh->b_page);
232 spin_unlock_irq(&btnc->tree_lock);
245 err = invalidate_inode_pages2_range(btnc, newkey, newkey);
252 nbh = nilfs_btnode_create_block(btnc, newkey);
269 void nilfs_btnode_commit_change_key(struct address_space *btnc,
288 spin_lock_irq(&btnc->tree_lock);
289 radix_tree_delete(&btnc->page_tree, oldkey);
290 radix_tree_tag_set(&btnc->page_tree, newkey,
292 spin_unlock_irq(&btnc->tree_lock);
310 void nilfs_btnode_abort_change_key(struct address_space *btnc,
320 spin_lock_irq(&btnc->tree_lock);
321 radix_tree_delete(&btnc->page_tree, newkey);
322 spin_unlock_irq(&btnc->tree_lock);