[PATCH] arm: allow for arch-specific IOREMAP_MAX_ORDER
[linux-ginger.git] / fs / afs / internal.h
blobf09860b45c1a303e9f0702bf2ab9636f6a26689d
1 /* internal.h: internal AFS stuff
3 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #ifndef AFS_INTERNAL_H
13 #define AFS_INTERNAL_H
15 #include <linux/compiler.h>
16 #include <linux/kernel.h>
17 #include <linux/fs.h>
18 #include <linux/pagemap.h>
21 * debug tracing
23 #define kenter(FMT, a...) printk("==> %s("FMT")\n",__FUNCTION__ , ## a)
24 #define kleave(FMT, a...) printk("<== %s()"FMT"\n",__FUNCTION__ , ## a)
25 #define kdebug(FMT, a...) printk(FMT"\n" , ## a)
26 #define kproto(FMT, a...) printk("### "FMT"\n" , ## a)
27 #define knet(FMT, a...) printk(FMT"\n" , ## a)
29 #ifdef __KDEBUG
30 #define _enter(FMT, a...) kenter(FMT , ## a)
31 #define _leave(FMT, a...) kleave(FMT , ## a)
32 #define _debug(FMT, a...) kdebug(FMT , ## a)
33 #define _proto(FMT, a...) kproto(FMT , ## a)
34 #define _net(FMT, a...) knet(FMT , ## a)
35 #else
36 #define _enter(FMT, a...) do { } while(0)
37 #define _leave(FMT, a...) do { } while(0)
38 #define _debug(FMT, a...) do { } while(0)
39 #define _proto(FMT, a...) do { } while(0)
40 #define _net(FMT, a...) do { } while(0)
41 #endif
43 static inline void afs_discard_my_signals(void)
45 while (signal_pending(current)) {
46 siginfo_t sinfo;
48 spin_lock_irq(&current->sighand->siglock);
49 dequeue_signal(current,&current->blocked, &sinfo);
50 spin_unlock_irq(&current->sighand->siglock);
55 * cell.c
57 extern struct rw_semaphore afs_proc_cells_sem;
58 extern struct list_head afs_proc_cells;
59 #ifdef AFS_CACHING_SUPPORT
60 extern struct cachefs_index_def afs_cache_cell_index_def;
61 #endif
64 * dir.c
66 extern struct inode_operations afs_dir_inode_operations;
67 extern struct file_operations afs_dir_file_operations;
70 * file.c
72 extern struct address_space_operations afs_fs_aops;
73 extern struct inode_operations afs_file_inode_operations;
74 extern struct file_operations afs_file_file_operations;
76 #ifdef AFS_CACHING_SUPPORT
77 extern int afs_cache_get_page_cookie(struct page *page,
78 struct cachefs_page **_page_cookie);
79 #endif
82 * inode.c
84 extern int afs_iget(struct super_block *sb, struct afs_fid *fid,
85 struct inode **_inode);
86 extern int afs_inode_getattr(struct vfsmount *mnt, struct dentry *dentry,
87 struct kstat *stat);
88 extern void afs_clear_inode(struct inode *inode);
91 * key_afs.c
93 #ifdef CONFIG_KEYS
94 extern int afs_key_register(void);
95 extern void afs_key_unregister(void);
96 #endif
99 * main.c
101 #ifdef AFS_CACHING_SUPPORT
102 extern struct cachefs_netfs afs_cache_netfs;
103 #endif
106 * mntpt.c
108 extern struct inode_operations afs_mntpt_inode_operations;
109 extern struct file_operations afs_mntpt_file_operations;
110 extern struct afs_timer afs_mntpt_expiry_timer;
111 extern struct afs_timer_ops afs_mntpt_expiry_timer_ops;
112 extern unsigned long afs_mntpt_expiry_timeout;
114 extern int afs_mntpt_check_symlink(struct afs_vnode *vnode);
117 * super.c
119 extern int afs_fs_init(void);
120 extern void afs_fs_exit(void);
122 #define AFS_CB_HASH_COUNT (PAGE_SIZE / sizeof(struct list_head))
124 extern struct list_head afs_cb_hash_tbl[];
125 extern spinlock_t afs_cb_hash_lock;
127 #define afs_cb_hash(SRV,FID) \
128 afs_cb_hash_tbl[((unsigned long)(SRV) + \
129 (FID)->vid + (FID)->vnode + (FID)->unique) % \
130 AFS_CB_HASH_COUNT]
133 * proc.c
135 extern int afs_proc_init(void);
136 extern void afs_proc_cleanup(void);
137 extern int afs_proc_cell_setup(struct afs_cell *cell);
138 extern void afs_proc_cell_remove(struct afs_cell *cell);
140 #endif /* AFS_INTERNAL_H */