Linux Audio

Check our new training course

Loading...
v6.2
 1/* SPDX-License-Identifier: GPL-2.0+ */
 2/*
 3 * NILFS B-tree node cache
 4 *
 5 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
 6 *
 
 
 
 
 
 
 
 
 
 
 7 * Written by Seiji Kihara.
 8 * Revised by Ryusuke Konishi.
 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
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 */
26struct nilfs_btnode_chkey_ctxt {
27	__u64 oldkey;
28	__u64 newkey;
29	struct buffer_head *bh;
30	struct buffer_head *newbh;
31};
32
33void nilfs_init_btnc_inode(struct inode *btnc_inode);
34void nilfs_btnode_cache_clear(struct address_space *);
35struct buffer_head *nilfs_btnode_create_block(struct address_space *btnc,
36					      __u64 blocknr);
37int nilfs_btnode_submit_block(struct address_space *, __u64, sector_t,
38			      blk_opf_t, struct buffer_head **, sector_t *);
39void nilfs_btnode_delete(struct buffer_head *);
40int nilfs_btnode_prepare_change_key(struct address_space *,
41				    struct nilfs_btnode_chkey_ctxt *);
42void nilfs_btnode_commit_change_key(struct address_space *,
43				    struct nilfs_btnode_chkey_ctxt *);
44void nilfs_btnode_abort_change_key(struct address_space *,
45				   struct nilfs_btnode_chkey_ctxt *);
46
47#endif	/* _NILFS_BTNODE_H */
v4.10.11
 
 1/*
 2 * btnode.h - NILFS B-tree node cache
 3 *
 4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
 5 *
 6 * This program is free software; you can redistribute it and/or modify
 7 * it under the terms of the GNU General Public License as published by
 8 * the Free Software Foundation; either version 2 of the License, or
 9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * Written by Seiji Kihara.
17 * Revised by Ryusuke Konishi.
18 */
19
20#ifndef _NILFS_BTNODE_H
21#define _NILFS_BTNODE_H
22
23#include <linux/types.h>
24#include <linux/buffer_head.h>
25#include <linux/fs.h>
26#include <linux/backing-dev.h>
27
28/**
29 * struct nilfs_btnode_chkey_ctxt - change key context
30 * @oldkey: old key of block's moving content
31 * @newkey: new key for block's content
32 * @bh: buffer head of old buffer
33 * @newbh: buffer head of new buffer
34 */
35struct nilfs_btnode_chkey_ctxt {
36	__u64 oldkey;
37	__u64 newkey;
38	struct buffer_head *bh;
39	struct buffer_head *newbh;
40};
41
 
42void nilfs_btnode_cache_clear(struct address_space *);
43struct buffer_head *nilfs_btnode_create_block(struct address_space *btnc,
44					      __u64 blocknr);
45int nilfs_btnode_submit_block(struct address_space *, __u64, sector_t, int,
46			      int, struct buffer_head **, sector_t *);
47void nilfs_btnode_delete(struct buffer_head *);
48int nilfs_btnode_prepare_change_key(struct address_space *,
49				    struct nilfs_btnode_chkey_ctxt *);
50void nilfs_btnode_commit_change_key(struct address_space *,
51				    struct nilfs_btnode_chkey_ctxt *);
52void nilfs_btnode_abort_change_key(struct address_space *,
53				   struct nilfs_btnode_chkey_ctxt *);
54
55#endif	/* _NILFS_BTNODE_H */