diff options
Diffstat (limited to 'fs/autofs4/autofs_i.h')
-rw-r--r-- | fs/autofs4/autofs_i.h | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index 69a2f5c92319..e0f16da00e54 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h | |||
@@ -14,6 +14,7 @@ | |||
14 | /* Internal header file for autofs */ | 14 | /* Internal header file for autofs */ |
15 | 15 | ||
16 | #include <linux/auto_fs4.h> | 16 | #include <linux/auto_fs4.h> |
17 | #include <linux/auto_dev-ioctl.h> | ||
17 | #include <linux/mutex.h> | 18 | #include <linux/mutex.h> |
18 | #include <linux/list.h> | 19 | #include <linux/list.h> |
19 | 20 | ||
@@ -21,6 +22,11 @@ | |||
21 | #define AUTOFS_IOC_FIRST AUTOFS_IOC_READY | 22 | #define AUTOFS_IOC_FIRST AUTOFS_IOC_READY |
22 | #define AUTOFS_IOC_COUNT 32 | 23 | #define AUTOFS_IOC_COUNT 32 |
23 | 24 | ||
25 | #define AUTOFS_DEV_IOCTL_IOC_FIRST (AUTOFS_DEV_IOCTL_VERSION) | ||
26 | #define AUTOFS_DEV_IOCTL_IOC_COUNT (AUTOFS_IOC_COUNT - 11) | ||
27 | |||
28 | #define AUTOFS_TYPE_TRIGGER (AUTOFS_TYPE_DIRECT|AUTOFS_TYPE_OFFSET) | ||
29 | |||
24 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
25 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
26 | #include <linux/time.h> | 32 | #include <linux/time.h> |
@@ -35,11 +41,27 @@ | |||
35 | /* #define DEBUG */ | 41 | /* #define DEBUG */ |
36 | 42 | ||
37 | #ifdef DEBUG | 43 | #ifdef DEBUG |
38 | #define DPRINTK(fmt,args...) do { printk(KERN_DEBUG "pid %d: %s: " fmt "\n" , current->pid , __func__ , ##args); } while(0) | 44 | #define DPRINTK(fmt, args...) \ |
45 | do { \ | ||
46 | printk(KERN_DEBUG "pid %d: %s: " fmt "\n", \ | ||
47 | current->pid, __func__, ##args); \ | ||
48 | } while (0) | ||
39 | #else | 49 | #else |
40 | #define DPRINTK(fmt,args...) do {} while(0) | 50 | #define DPRINTK(fmt, args...) do {} while (0) |
41 | #endif | 51 | #endif |
42 | 52 | ||
53 | #define AUTOFS_WARN(fmt, args...) \ | ||
54 | do { \ | ||
55 | printk(KERN_WARNING "pid %d: %s: " fmt "\n", \ | ||
56 | current->pid, __func__, ##args); \ | ||
57 | } while (0) | ||
58 | |||
59 | #define AUTOFS_ERROR(fmt, args...) \ | ||
60 | do { \ | ||
61 | printk(KERN_ERR "pid %d: %s: " fmt "\n", \ | ||
62 | current->pid, __func__, ##args); \ | ||
63 | } while (0) | ||
64 | |||
43 | /* Unified info structure. This is pointed to by both the dentry and | 65 | /* Unified info structure. This is pointed to by both the dentry and |
44 | inode structures. Each file in the filesystem has an instance of this | 66 | inode structures. Each file in the filesystem has an instance of this |
45 | structure. It holds a reference to the dentry, so dentries are never | 67 | structure. It holds a reference to the dentry, so dentries are never |
@@ -61,6 +83,9 @@ struct autofs_info { | |||
61 | unsigned long last_used; | 83 | unsigned long last_used; |
62 | atomic_t count; | 84 | atomic_t count; |
63 | 85 | ||
86 | uid_t uid; | ||
87 | gid_t gid; | ||
88 | |||
64 | mode_t mode; | 89 | mode_t mode; |
65 | size_t size; | 90 | size_t size; |
66 | 91 | ||
@@ -92,10 +117,6 @@ struct autofs_wait_queue { | |||
92 | 117 | ||
93 | #define AUTOFS_SBI_MAGIC 0x6d4a556d | 118 | #define AUTOFS_SBI_MAGIC 0x6d4a556d |
94 | 119 | ||
95 | #define AUTOFS_TYPE_INDIRECT 0x0001 | ||
96 | #define AUTOFS_TYPE_DIRECT 0x0002 | ||
97 | #define AUTOFS_TYPE_OFFSET 0x0004 | ||
98 | |||
99 | struct autofs_sb_info { | 120 | struct autofs_sb_info { |
100 | u32 magic; | 121 | u32 magic; |
101 | int pipefd; | 122 | int pipefd; |
@@ -169,6 +190,17 @@ int autofs4_expire_run(struct super_block *, struct vfsmount *, | |||
169 | struct autofs_packet_expire __user *); | 190 | struct autofs_packet_expire __user *); |
170 | int autofs4_expire_multi(struct super_block *, struct vfsmount *, | 191 | int autofs4_expire_multi(struct super_block *, struct vfsmount *, |
171 | struct autofs_sb_info *, int __user *); | 192 | struct autofs_sb_info *, int __user *); |
193 | struct dentry *autofs4_expire_direct(struct super_block *sb, | ||
194 | struct vfsmount *mnt, | ||
195 | struct autofs_sb_info *sbi, int how); | ||
196 | struct dentry *autofs4_expire_indirect(struct super_block *sb, | ||
197 | struct vfsmount *mnt, | ||
198 | struct autofs_sb_info *sbi, int how); | ||
199 | |||
200 | /* Device node initialization */ | ||
201 | |||
202 | int autofs_dev_ioctl_init(void); | ||
203 | void autofs_dev_ioctl_exit(void); | ||
172 | 204 | ||
173 | /* Operations structures */ | 205 | /* Operations structures */ |
174 | 206 | ||