2
* Copyright (C) 2005-2008 Junjiro Okajima
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.
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.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
* copy-up/down functions
22
* $Id: cpup.h,v 1.2 2008/04/21 01:33:43 sfjro Exp $
25
#ifndef __AUFS_CPUP_H__
26
#define __AUFS_CPUP_H__
31
#include <linux/aufs_type.h>
33
void au_cpup_attr_timesizes(struct inode *inode);
34
void au_cpup_attr_nlink(struct inode *inode);
35
void au_cpup_attr_changeable(struct inode *inode);
36
void au_cpup_igen(struct inode *inode, struct inode *h_inode);
37
void au_cpup_attr_all(struct inode *inode);
39
/* ---------------------------------------------------------------------- */
42
#define AuCpup_DTIME 1 /* do dtime_store/revert */
43
#define au_ftest_cpup(flags, name) ((flags) & AuCpup_##name)
44
#define au_fset_cpup(flags, name) { (flags) |= AuCpup_##name; }
45
#define au_fclr_cpup(flags, name) { (flags) &= ~AuCpup_##name; }
47
int au_cpup_single(struct dentry *dentry, aufs_bindex_t bdst,
48
aufs_bindex_t bsrc, loff_t len, unsigned int flags);
49
int au_sio_cpup_single(struct dentry *dentry, aufs_bindex_t bdst,
50
aufs_bindex_t bsrc, loff_t len, unsigned int flags);
51
int au_cpup_simple(struct dentry *dentry, aufs_bindex_t bdst, loff_t len,
53
int au_sio_cpup_simple(struct dentry *dentry, aufs_bindex_t bdst, loff_t len,
55
int au_cpup_wh(struct dentry *dentry, aufs_bindex_t bdst, loff_t len,
57
int au_sio_cpup_wh(struct dentry *dentry, aufs_bindex_t bdst, loff_t len,
60
int au_cp_dirs(struct dentry *dentry, aufs_bindex_t bdst, struct dentry *locked,
61
int (*cp)(struct dentry *dentry, aufs_bindex_t bdst,
62
struct dentry *h_parent, void *arg),
64
int au_cpup_dirs(struct dentry *dentry, aufs_bindex_t bdst,
65
struct dentry *locked);
66
int au_test_and_cpup_dirs(struct dentry *dentry, aufs_bindex_t bdst,
67
struct dentry *locked);
69
/* ---------------------------------------------------------------------- */
71
/* keep timestamps when copyup */
73
struct dentry *dt_dentry, *dt_h_dentry;
74
struct au_hinode *dt_hdir;
75
struct timespec dt_atime, dt_mtime;
77
void au_dtime_store(struct au_dtime *dt, struct dentry *dentry,
78
struct dentry *h_dentry, struct au_hinode *hdir);
79
void au_dtime_revert(struct au_dtime *dt);
81
#endif /* __KERNEL__ */
82
#endif /* __AUFS_CPUP_H__ */