]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - fs/aufs/dynop.h
x86/mm: Add TLB purge to free pmd/pte page interfaces
[mirror_ubuntu-bionic-kernel.git] / fs / aufs / dynop.h
CommitLineData
c088e31d
SF
1/*
2 * Copyright (C) 2010-2017 Junjiro R. Okajima
3 *
4 * This program, aufs is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/*
19 * dynamically customizable operations (for regular files only)
20 */
21
22#ifndef __AUFS_DYNOP_H__
23#define __AUFS_DYNOP_H__
24
25#ifdef __KERNEL__
26
27#include <linux/fs.h>
28#include <linux/kref.h>
29
30enum {AuDy_AOP, AuDyLast};
31
32struct au_dynop {
33 int dy_type;
34 union {
35 const void *dy_hop;
36 const struct address_space_operations *dy_haop;
37 };
38};
39
40struct au_dykey {
41 union {
42 struct hlist_bl_node dk_hnode;
43 struct rcu_head dk_rcu;
44 };
45 struct au_dynop dk_op;
46
47 /*
48 * during I am in the branch local array, kref is gotten. when the
49 * branch is removed, kref is put.
50 */
51 struct kref dk_kref;
52};
53
54/* stop unioning since their sizes are very different from each other */
55struct au_dyaop {
56 struct au_dykey da_key;
57 struct address_space_operations da_op; /* not const */
58};
59
60/* ---------------------------------------------------------------------- */
61
62/* dynop.c */
63struct au_branch;
64void au_dy_put(struct au_dykey *key);
65int au_dy_iaop(struct inode *inode, aufs_bindex_t bindex,
66 struct inode *h_inode);
67int au_dy_irefresh(struct inode *inode);
68void au_dy_arefresh(int do_dio);
69
70void __init au_dy_init(void);
71void au_dy_fin(void);
72
73#endif /* __KERNEL__ */
74#endif /* __AUFS_DYNOP_H__ */