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