]>
Commit | Line | Data |
---|---|---|
ae98043f | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
a60be987 | 2 | /* |
94ee1d91 | 3 | * NILFS B-tree node cache |
a60be987 RK |
4 | * |
5 | * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation. | |
6 | * | |
4b420ab4 RK |
7 | * Written by Seiji Kihara. |
8 | * Revised by Ryusuke Konishi. | |
a60be987 RK |
9 | */ |
10 | ||
11 | #ifndef _NILFS_BTNODE_H | |
12 | #define _NILFS_BTNODE_H | |
13 | ||
14 | #include <linux/types.h> | |
15 | #include <linux/buffer_head.h> | |
16 | #include <linux/fs.h> | |
17 | #include <linux/backing-dev.h> | |
18 | ||
f5974c8f VD |
19 | /** |
20 | * struct nilfs_btnode_chkey_ctxt - change key context | |
21 | * @oldkey: old key of block's moving content | |
22 | * @newkey: new key for block's content | |
23 | * @bh: buffer head of old buffer | |
24 | * @newbh: buffer head of new buffer | |
25 | */ | |
a60be987 RK |
26 | struct nilfs_btnode_chkey_ctxt { |
27 | __u64 oldkey; | |
28 | __u64 newkey; | |
29 | struct buffer_head *bh; | |
30 | struct buffer_head *newbh; | |
31 | }; | |
32 | ||
e897be17 | 33 | void nilfs_init_btnc_inode(struct inode *btnc_inode); |
a60be987 | 34 | void nilfs_btnode_cache_clear(struct address_space *); |
d501d736 RK |
35 | struct buffer_head *nilfs_btnode_create_block(struct address_space *btnc, |
36 | __u64 blocknr); | |
ed451259 BVA |
37 | int nilfs_btnode_submit_block(struct address_space *, __u64, sector_t, |
38 | blk_opf_t, struct buffer_head **, sector_t *); | |
a60be987 RK |
39 | void nilfs_btnode_delete(struct buffer_head *); |
40 | int nilfs_btnode_prepare_change_key(struct address_space *, | |
41 | struct nilfs_btnode_chkey_ctxt *); | |
42 | void nilfs_btnode_commit_change_key(struct address_space *, | |
43 | struct nilfs_btnode_chkey_ctxt *); | |
44 | void nilfs_btnode_abort_change_key(struct address_space *, | |
45 | struct nilfs_btnode_chkey_ctxt *); | |
46 | ||
a60be987 | 47 | #endif /* _NILFS_BTNODE_H */ |