~ubuntu-branches/ubuntu/quantal/aufs/quantal

« back to all changes in this revision

Viewing changes to fs/aufs/whout.h

  • Committer: Bazaar Package Importer
  • Author(s): Julian Andres Klode
  • Date: 2007-05-09 15:29:28 UTC
  • Revision ID: james.westby@ubuntu.com-20070509152928-4sywrmkifvz0bq02
Tags: upstream-0+20070509
ImportĀ upstreamĀ versionĀ 0+20070509

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2005, 2006, 2007 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
/* $Id: whout.h,v 1.7 2007/04/09 02:46:28 sfjro Exp $ */
 
20
 
 
21
#ifndef __AUFS_WHOUT_H__
 
22
#define __AUFS_WHOUT_H__
 
23
 
 
24
#include <linux/fs.h>
 
25
#include <linux/aufs_type.h>
 
26
 
 
27
#ifdef __KERNEL__
 
28
 
 
29
int au_alloc_whname(const char *name, int len, struct qstr *wh);
 
30
void au_free_whname(struct qstr *wh);
 
31
 
 
32
struct lkup_args;
 
33
int is_wh(struct dentry *h_parent, struct qstr *wh_name, int try_sio,
 
34
          struct lkup_args *lkup);
 
35
int is_diropq(struct dentry *h_dentry, struct lkup_args *lkup);
 
36
 
 
37
struct dentry *lkup_whtmp(struct dentry *h_parent, struct qstr *prefix,
 
38
                          struct lkup_args *lkup);
 
39
int rename_whtmp(struct dentry *dentry, aufs_bindex_t bindex);
 
40
int au_unlink_wh_dentry(struct inode *h_dir, struct dentry *wh_dentry,
 
41
                        struct dentry *dentry, int dlgt);
 
42
 
 
43
struct aufs_branch;
 
44
int init_wh(struct dentry *h_parent, struct aufs_branch *br,
 
45
            struct vfsmount *nfsmnt, struct super_block *sb);
 
46
 
 
47
struct dentry *sio_diropq(struct dentry *dentry, aufs_bindex_t bindex,
 
48
                          int do_create, int dlgt);
 
49
 
 
50
struct dentry *lkup_wh(struct dentry *h_parent, struct qstr *base_name,
 
51
                       struct lkup_args *lkup);
 
52
struct dentry *simple_create_wh(struct dentry *dentry, aufs_bindex_t bindex,
 
53
                                struct dentry *h_parent,
 
54
                                struct lkup_args *lkup);
 
55
 
 
56
struct rmdir_whtmp_arg {
 
57
        struct dentry *h_dentry;
 
58
        struct aufs_nhash whlist;
 
59
        aufs_bindex_t bindex;
 
60
        struct inode *dir, *inode;
 
61
};
 
62
 
 
63
struct aufs_nhash;
 
64
int rmdir_whtmp(struct dentry *h_dentry, struct aufs_nhash *whlist,
 
65
                aufs_bindex_t bindex, struct inode *dir, struct inode *inode);
 
66
void kick_rmdir_whtmp(struct dentry *h_dentry, struct aufs_nhash *whlist,
 
67
                      aufs_bindex_t bindex, struct inode *dir,
 
68
                      struct inode *inode, struct rmdir_whtmp_arg *arg);
 
69
 
 
70
/* ---------------------------------------------------------------------- */
 
71
 
 
72
static inline
 
73
struct dentry *create_diropq(struct dentry *dentry, aufs_bindex_t bindex,
 
74
                             int dlgt)
 
75
{
 
76
        return sio_diropq(dentry, bindex, 1, dlgt);
 
77
}
 
78
 
 
79
static inline
 
80
int remove_diropq(struct dentry *dentry, aufs_bindex_t bindex, int dlgt)
 
81
{
 
82
        return PTR_ERR(sio_diropq(dentry, bindex, 0, dlgt));
 
83
}
 
84
 
 
85
#endif /* __KERNEL__ */
 
86
#endif /* __AUFS_WHOUT_H__ */