linux-dynamic-inodes-20050710
[openafs.git] / src / afs / LINUX / osi_prototypes.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*
11  * Exported linux support routines.
12  */
13 #ifndef _OSI_PROTO_H_
14 #define _OSI_PROTO_H_
15
16 /* osi_alloc.c */
17 extern void *osi_linux_alloc(unsigned int size, int drop_glock);
18 extern void osi_linux_free(void *addr);
19 extern void osi_linux_free_afs_memory(void);
20 /* Debugging aid */
21 extern void osi_linux_verify_alloced_memory(void);
22
23 /* osi_cred.c */
24 extern cred_t *crget(void);
25 extern void crfree(cred_t * cr);
26 extern cred_t *crdup(cred_t * cr);
27 extern cred_t *crref(void);
28 extern void crset(cred_t * cr);
29
30 /* osi_file.c */
31 extern afs_rwlock_t afs_xosi;
32
33 /* osi_misc.c */
34 extern int osi_lookupname(char *aname, uio_seg_t seg, int followlink,
35                           struct dentry **dpp);
36 extern int osi_InitCacheInfo(char *aname);
37 extern int osi_rdwr(struct osi_file *osifile, uio_t * uiop, int rw);
38 extern void afs_osi_SetTime(osi_timeval_t * tvp);
39 extern void osi_linux_free_inode_pages(void);
40
41 /* osi_probe.c */
42 extern void *osi_find_syscall_table(int which);
43
44 /* osi_syscall.c */
45 extern int osi_syscall_init(void);
46 extern void osi_syscall_clean(void);
47
48 /* osi_sysctl.c */
49 extern int osi_sysctl_init(void);
50 extern void osi_sysctl_clean(void);
51
52 /* osi_vm.c */
53 extern int osi_VM_FlushVCache(struct vcache *avc, int *slept);
54 extern void osi_VM_TryToSmush(struct vcache *avc, struct AFS_UCRED *acred,
55                               int sync);
56 extern void osi_VM_FSyncInval(struct vcache *avc);
57 extern void osi_VM_StoreAllSegments(struct vcache *avc);
58 extern void osi_VM_FlushPages(struct vcache *avc, struct AFS_UCRED *credp);
59 extern void osi_VM_Truncate(struct vcache *avc, int alen,
60                             struct AFS_UCRED *acred);
61
62 /* osi_vfsops.c */
63 extern void vattr2inode(struct inode *ip, struct vattr *vp);
64 extern int afs_init_inodecache(void);
65 extern void afs_destroy_inodecache(void);
66
67 /* osi_vnodeops.c */
68 extern void afs_fill_inode(struct inode *ip, struct vattr *vattr);
69
70 #endif /* _OSI_PROTO_H_ */