~ubuntu-branches/ubuntu/vivid/aufs/vivid

« back to all changes in this revision

Viewing changes to fs/aufs25/cpup.h

  • Committer: Bazaar Package Importer
  • Author(s): Julian Andres Klode
  • Date: 2008-05-06 18:35:50 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080506183550-0b6c974kkgc46oeh
Tags: 0+20080506-1
* New upstream release, supports Kernel 2.6.25 (Closes: #479717)
* Fix building with older Kernels (Closes: #475042)
* Update the patches 01, 04 and 07 to also patch fs/aufs25

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2005-2008 Junjiro 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, write to the Free Software
 
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
17
 */
 
18
 
 
19
/*
 
20
 * copy-up/down functions
 
21
 *
 
22
 * $Id: cpup.h,v 1.2 2008/04/21 01:33:43 sfjro Exp $
 
23
 */
 
24
 
 
25
#ifndef __AUFS_CPUP_H__
 
26
#define __AUFS_CPUP_H__
 
27
 
 
28
#ifdef __KERNEL__
 
29
 
 
30
#include <linux/fs.h>
 
31
#include <linux/aufs_type.h>
 
32
 
 
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);
 
38
 
 
39
/* ---------------------------------------------------------------------- */
 
40
 
 
41
/* cpup flags */
 
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; }
 
46
 
 
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,
 
52
                   unsigned int flags);
 
53
int au_sio_cpup_simple(struct dentry *dentry, aufs_bindex_t bdst, loff_t len,
 
54
                       unsigned int flags);
 
55
int au_cpup_wh(struct dentry *dentry, aufs_bindex_t bdst, loff_t len,
 
56
               struct file *file);
 
57
int au_sio_cpup_wh(struct dentry *dentry, aufs_bindex_t bdst, loff_t len,
 
58
                   struct file *file);
 
59
 
 
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),
 
63
               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);
 
68
 
 
69
/* ---------------------------------------------------------------------- */
 
70
 
 
71
/* keep timestamps when copyup */
 
72
struct au_dtime {
 
73
        struct dentry *dt_dentry, *dt_h_dentry;
 
74
        struct au_hinode *dt_hdir;
 
75
        struct timespec dt_atime, dt_mtime;
 
76
};
 
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);
 
80
 
 
81
#endif /* __KERNEL__ */
 
82
#endif /* __AUFS_CPUP_H__ */