xref: /titanic_51/usr/src/uts/common/fs/fs_subr.h (revision fb9f9b975cb9214fec5dab37d461199adab9b964)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23 /*	  All Rights Reserved  	*/
24 
25 /*
26  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
27  * Use is subject to license terms.
28  */
29 
30 #ifndef	_SYS_FS_SUBR_H
31 #define	_SYS_FS_SUBR_H
32 
33 #pragma ident	"%Z%%M%	%I%	%E% SMI"
34 
35 #include <sys/types.h>
36 #include <sys/cred.h>
37 #include <sys/fcntl.h>
38 #include <sys/poll.h>
39 #include <sys/vfs.h>
40 #include <sys/vnode.h>
41 #include <vm/page.h>
42 #include <sys/acl.h>
43 #include <sys/share.h>
44 #include <sys/flock.h>
45 
46 #ifdef	__cplusplus
47 extern "C" {
48 #endif
49 
50 /*
51  * Utilities shared among file system implementations.
52  */
53 
54 #ifdef	_KERNEL
55 
56 extern int	fs_nosys();
57 extern int	fs_inval();
58 extern int	fs_notdir();
59 extern int	fs_nosys_map(struct vnode *, offset_t, struct as *, caddr_t *,
60 			size_t, uchar_t, uchar_t, uint_t, struct cred *);
61 extern int	fs_nosys_addmap(struct vnode *, offset_t, struct as *, caddr_t,
62 			size_t, uchar_t, uchar_t, uint_t, struct cred *);
63 extern int	fs_nosys_poll(struct vnode *, short, int, short *,
64 			struct pollhead **);
65 
66 extern int	fs_sync(struct vfs *, short, cred_t *);
67 extern int	fs_rwlock(vnode_t *, int, caller_context_t *);
68 extern void	fs_rwunlock(vnode_t *, int, caller_context_t *);
69 extern int	fs_cmp(vnode_t *, vnode_t *);
70 extern int	fs_seek(vnode_t *, offset_t, offset_t *);
71 extern int	fs_frlock(vnode_t *, int, struct flock64 *, int, offset_t,
72 			struct flk_callback *, cred_t *);
73 extern int	fs_setfl(vnode_t *, int, int, cred_t *);
74 extern int	fs_poll(vnode_t *, short, int, short *, struct pollhead **);
75 extern int	fs_pathconf(struct vnode *, int, ulong_t *, struct cred *);
76 extern void	clkset(time_t);
77 extern void	fs_dispose(struct vnode *, page_t *, int, int, struct cred *);
78 extern void	fs_nodispose(struct vnode *, page_t *, int, int, struct cred *);
79 extern int	fs_fab_acl(struct vnode *, vsecattr_t *, int flag, cred_t *);
80 extern int	fs_shrlock(struct vnode *, int, struct shrlock *, int,
81 			cred_t *);
82 extern int	fs_vnevent_nosupport(vnode_t *, vnevent_t);
83 extern int	fs_vnevent_support(vnode_t *, vnevent_t);
84 extern int	fs_acl_nontrivial(struct vnode *vp, struct cred *cr);
85 
86 #endif	/* _KERNEL */
87 
88 #ifdef	__cplusplus
89 }
90 #endif
91 
92 #endif /* _SYS_FS_SUBR_H */
93