sysvbfs.h revision 1.6.30.2 1 1.6.30.2 pooka /* $NetBSD: sysvbfs.h,v 1.6.30.2 2007/07/31 21:14:19 pooka Exp $ */
2 1.6.30.2 pooka
3 1.6.30.2 pooka /*-
4 1.6.30.2 pooka * Copyright (c) 2004 The NetBSD Foundation, Inc.
5 1.6.30.2 pooka * All rights reserved.
6 1.6.30.2 pooka *
7 1.6.30.2 pooka * This code is derived from software contributed to The NetBSD Foundation
8 1.6.30.2 pooka * by UCHIYAMA Yasushi.
9 1.6.30.2 pooka *
10 1.6.30.2 pooka * Redistribution and use in source and binary forms, with or without
11 1.6.30.2 pooka * modification, are permitted provided that the following conditions
12 1.6.30.2 pooka * are met:
13 1.6.30.2 pooka * 1. Redistributions of source code must retain the above copyright
14 1.6.30.2 pooka * notice, this list of conditions and the following disclaimer.
15 1.6.30.2 pooka * 2. Redistributions in binary form must reproduce the above copyright
16 1.6.30.2 pooka * notice, this list of conditions and the following disclaimer in the
17 1.6.30.2 pooka * documentation and/or other materials provided with the distribution.
18 1.6.30.2 pooka * 3. All advertising materials mentioning features or use of this software
19 1.6.30.2 pooka * must display the following acknowledgement:
20 1.6.30.2 pooka * This product includes software developed by the NetBSD
21 1.6.30.2 pooka * Foundation, Inc. and its contributors.
22 1.6.30.2 pooka * 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.6.30.2 pooka * contributors may be used to endorse or promote products derived
24 1.6.30.2 pooka * from this software without specific prior written permission.
25 1.6.30.2 pooka *
26 1.6.30.2 pooka * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.6.30.2 pooka * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.6.30.2 pooka * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.6.30.2 pooka * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.6.30.2 pooka * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.6.30.2 pooka * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.6.30.2 pooka * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.6.30.2 pooka * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.6.30.2 pooka * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.6.30.2 pooka * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.6.30.2 pooka * POSSIBILITY OF SUCH DAMAGE.
37 1.6.30.2 pooka */
38 1.6.30.2 pooka
39 1.6.30.2 pooka #ifndef _FS_SYSVBFS_SYSVBFS_H_
40 1.6.30.2 pooka #define _FS_SYSVBFS_SYSVBFS_H_
41 1.6.30.2 pooka
42 1.6.30.2 pooka struct sysvbfs_args {
43 1.6.30.2 pooka char *fspec; /* blocks special holding the fs to mount */
44 1.6.30.2 pooka };
45 1.6.30.2 pooka
46 1.6.30.2 pooka #ifdef _KERNEL
47 1.6.30.2 pooka struct bfs;
48 1.6.30.2 pooka struct buf;
49 1.6.30.2 pooka
50 1.6.30.2 pooka #include <miscfs/genfs/genfs.h>
51 1.6.30.2 pooka #include <miscfs/genfs/genfs_node.h>
52 1.6.30.2 pooka #include <miscfs/specfs/specdev.h>
53 1.6.30.2 pooka
54 1.6.30.2 pooka struct sysvbfs_node {
55 1.6.30.2 pooka struct genfs_node gnode;
56 1.6.30.2 pooka struct vnode *vnode;
57 1.6.30.2 pooka struct bfs_inode *inode;
58 1.6.30.2 pooka struct sysvbfs_mount *bmp;
59 1.6.30.2 pooka struct lockf *lockf; /* advlock */
60 1.6.30.2 pooka daddr_t data_block;
61 1.6.30.2 pooka size_t size;
62 1.6.30.2 pooka int update_ctime;
63 1.6.30.2 pooka int update_atime;
64 1.6.30.2 pooka int update_mtime;
65 1.6.30.2 pooka
66 1.6.30.2 pooka LIST_ENTRY(sysvbfs_node) link;
67 1.6.30.2 pooka };
68 1.6.30.2 pooka
69 1.6.30.2 pooka struct sysvbfs_mount {
70 1.6.30.2 pooka struct mount *mountp;
71 1.6.30.2 pooka struct vnode *devvp; /* block device mounted vnode */
72 1.6.30.2 pooka struct bfs *bfs;
73 1.6.30.2 pooka LIST_HEAD(, sysvbfs_node) bnode_head;
74 1.6.30.2 pooka };
75 1.6.30.2 pooka
76 1.6.30.2 pooka /* v-node ops. */
77 1.6.30.2 pooka int sysvbfs_lookup(void *);
78 1.6.30.2 pooka int sysvbfs_create(void *);
79 1.6.30.2 pooka int sysvbfs_open(void *);
80 1.6.30.2 pooka int sysvbfs_close(void *);
81 1.6.30.2 pooka int sysvbfs_access(void *);
82 1.6.30.2 pooka int sysvbfs_getattr(void *);
83 1.6.30.2 pooka int sysvbfs_setattr(void *);
84 1.6.30.2 pooka int sysvbfs_read(void *);
85 1.6.30.2 pooka int sysvbfs_write(void *);
86 1.6.30.2 pooka int sysvbfs_fsync(void *);
87 1.6.30.2 pooka int sysvbfs_remove(void *);
88 1.6.30.2 pooka int sysvbfs_rename(void *);
89 1.6.30.2 pooka int sysvbfs_readdir(void *);
90 1.6.30.2 pooka int sysvbfs_inactive(void *);
91 1.6.30.2 pooka int sysvbfs_reclaim(void *);
92 1.6.30.2 pooka int sysvbfs_bmap(void *);
93 1.6.30.2 pooka int sysvbfs_strategy(void *);
94 1.6.30.2 pooka int sysvbfs_print(void *);
95 1.6.30.2 pooka int sysvbfs_advlock(void *);
96 1.6.30.2 pooka int sysvbfs_pathconf(void *);
97 1.6.30.2 pooka
98 1.6.30.2 pooka /* vfs ops. */
99 1.6.30.2 pooka VFS_PROTOS(sysvbfs);
100 1.6.30.2 pooka
101 1.6.30.2 pooka extern int (**sysvbfs_vnodeop_p)(void *);
102 1.6.30.2 pooka
103 1.6.30.2 pooka /* genfs ops */
104 1.6.30.2 pooka int sysvbfs_gop_alloc(struct vnode *, off_t, off_t, int, kauth_cred_t);
105 1.6.30.2 pooka extern const struct genfs_ops sysvbfs_genfsops;
106 1.6.30.2 pooka
107 1.6.30.2 pooka /* internal service */
108 1.6.30.2 pooka int sysvbfs_update(struct vnode *, const struct timespec *,
109 1.6.30.2 pooka const struct timespec *, int);
110 1.6.30.2 pooka
111 1.6.30.2 pooka #endif /* _KERNEL */
112 1.6.30.2 pooka #endif /* _FS_SYSVBFS_SYSVBFS_H_ */
113