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