xref: /netbsd/sys/fs/v7fs/v7fs_extern.h (revision a2c6e0e9)
1*a2c6e0e9Shannken /*	$NetBSD: v7fs_extern.h,v 1.2 2014/12/29 15:29:38 hannken Exp $	*/
2ed990ef3Such 
3ed990ef3Such /*-
4ed990ef3Such  * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc.
5ed990ef3Such  * All rights reserved.
6ed990ef3Such  *
7ed990ef3Such  * This code is derived from software contributed to The NetBSD Foundation
8ed990ef3Such  * by UCHIYAMA Yasushi.
9ed990ef3Such  *
10ed990ef3Such  * Redistribution and use in source and binary forms, with or without
11ed990ef3Such  * modification, are permitted provided that the following conditions
12ed990ef3Such  * are met:
13ed990ef3Such  * 1. Redistributions of source code must retain the above copyright
14ed990ef3Such  *    notice, this list of conditions and the following disclaimer.
15ed990ef3Such  * 2. Redistributions in binary form must reproduce the above copyright
16ed990ef3Such  *    notice, this list of conditions and the following disclaimer in the
17ed990ef3Such  *    documentation and/or other materials provided with the distribution.
18ed990ef3Such  *
19ed990ef3Such  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20ed990ef3Such  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21ed990ef3Such  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22ed990ef3Such  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23ed990ef3Such  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24ed990ef3Such  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25ed990ef3Such  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26ed990ef3Such  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27ed990ef3Such  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28ed990ef3Such  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29ed990ef3Such  * POSSIBILITY OF SUCH DAMAGE.
30ed990ef3Such  */
31ed990ef3Such 
32ed990ef3Such #ifndef _FS_V7FS_EXTERN_H_
33ed990ef3Such #define	_FS_V7FS_EXTERN_H_
34ed990ef3Such 
35ed990ef3Such #include <fs/v7fs/v7fs_args.h>
36ed990ef3Such 
37ed990ef3Such #include <miscfs/genfs/genfs.h>
38ed990ef3Such #include <miscfs/genfs/genfs_node.h>
39ed990ef3Such #include <miscfs/specfs/specdev.h>
40ed990ef3Such 
41ed990ef3Such #include "v7fs.h"
42ed990ef3Such #include "v7fs_impl.h"
43ed990ef3Such #include "v7fs_inode.h"
44ed990ef3Such 
45ed990ef3Such struct v7fs_mount {
46ed990ef3Such 	struct mount *mountp;
47ed990ef3Such 	struct vnode *devvp;		/* block device mounted vnode */
48ed990ef3Such 	struct v7fs_self *core;		/* filesystem dependent implementation*/
49ed990ef3Such };
50ed990ef3Such 
51ed990ef3Such struct v7fs_node {
52ed990ef3Such 	struct genfs_node gnode;
53ed990ef3Such 	struct v7fs_inode inode; /* filesystem dependent implementation */
54ed990ef3Such 	struct vnode *vnode;		/* back-link */
55ed990ef3Such 	struct v7fs_mount *v7fsmount;	/* our filesystem */
56ed990ef3Such 	struct lockf *lockf;		/* advlock */
57ed990ef3Such 
58ed990ef3Such 	int update_ctime;
59ed990ef3Such 	int update_atime;
60ed990ef3Such 	int update_mtime;
61ed990ef3Such };
62ed990ef3Such 
63ed990ef3Such #define	VFSTOV7FS(mp)	((struct v7fs_mount *)((mp)->mnt_data))
64ed990ef3Such 
65ed990ef3Such __BEGIN_DECLS
66ed990ef3Such /* v-node ops. */
67ed990ef3Such int v7fs_lookup(void *);
68ed990ef3Such int v7fs_create(void *);
69ed990ef3Such int v7fs_open(void *);
70ed990ef3Such int v7fs_close(void *);
71ed990ef3Such int v7fs_access(void *);
72ed990ef3Such int v7fs_getattr(void *);
73ed990ef3Such int v7fs_setattr(void *);
74ed990ef3Such int v7fs_read(void *);
75ed990ef3Such int v7fs_write(void *);
76ed990ef3Such int v7fs_fsync(void *);
77ed990ef3Such int v7fs_remove(void *);
78ed990ef3Such int v7fs_rename(void *);
79ed990ef3Such int v7fs_readdir(void *);
80ed990ef3Such int v7fs_inactive(void *);
81ed990ef3Such int v7fs_reclaim(void *);
82ed990ef3Such int v7fs_bmap(void *);
83ed990ef3Such int v7fs_strategy(void *);
84ed990ef3Such int v7fs_print(void *);
85ed990ef3Such int v7fs_advlock(void *);
86ed990ef3Such int v7fs_pathconf(void *);
87ed990ef3Such 
88ed990ef3Such int v7fs_link(void *);
89ed990ef3Such int v7fs_symlink(void *);
90ed990ef3Such int v7fs_readlink(void *);
91ed990ef3Such 
92ed990ef3Such int v7fs_mkdir(void *);
93ed990ef3Such int v7fs_rmdir(void *);
94ed990ef3Such 
95ed990ef3Such int v7fs_mknod(void *);
96ed990ef3Such 
97ed990ef3Such /* vfs ops. */
98ed990ef3Such VFS_PROTOS(v7fs);
99ed990ef3Such 
100ed990ef3Such int v7fs_mountroot(void);
101ed990ef3Such extern int (**v7fs_vnodeop_p)(void *);
102ed990ef3Such extern int (**v7fs_specop_p)(void *);
103ed990ef3Such extern int (**v7fs_fifoop_p)(void *);
104ed990ef3Such 
105ed990ef3Such /* genfs ops */
106ed990ef3Such int v7fs_gop_alloc(struct vnode *, off_t, off_t, int, kauth_cred_t);
107ed990ef3Such extern const struct genfs_ops v7fs_genfsops;
108ed990ef3Such 
109ed990ef3Such /* internal service */
110ed990ef3Such int v7fs_update(struct vnode *, const struct timespec *,
111ed990ef3Such     const struct timespec *, int);
112ed990ef3Such __END_DECLS
113ed990ef3Such #endif /* _FS_V7FS_EXTERN_H_ */
114