11.2Shannken/*	$NetBSD: v7fs_extern.h,v 1.2 2014/12/29 15:29:38 hannken Exp $	*/
21.1Such
31.1Such/*-
41.1Such * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc.
51.1Such * All rights reserved.
61.1Such *
71.1Such * This code is derived from software contributed to The NetBSD Foundation
81.1Such * by UCHIYAMA Yasushi.
91.1Such *
101.1Such * Redistribution and use in source and binary forms, with or without
111.1Such * modification, are permitted provided that the following conditions
121.1Such * are met:
131.1Such * 1. Redistributions of source code must retain the above copyright
141.1Such *    notice, this list of conditions and the following disclaimer.
151.1Such * 2. Redistributions in binary form must reproduce the above copyright
161.1Such *    notice, this list of conditions and the following disclaimer in the
171.1Such *    documentation and/or other materials provided with the distribution.
181.1Such *
191.1Such * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
201.1Such * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
211.1Such * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221.1Such * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
231.1Such * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
241.1Such * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
251.1Such * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
261.1Such * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
271.1Such * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
281.1Such * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
291.1Such * POSSIBILITY OF SUCH DAMAGE.
301.1Such */
311.1Such
321.1Such#ifndef _FS_V7FS_EXTERN_H_
331.1Such#define	_FS_V7FS_EXTERN_H_
341.1Such
351.1Such#include <fs/v7fs/v7fs_args.h>
361.1Such
371.1Such#include <miscfs/genfs/genfs.h>
381.1Such#include <miscfs/genfs/genfs_node.h>
391.1Such#include <miscfs/specfs/specdev.h>
401.1Such
411.1Such#include "v7fs.h"
421.1Such#include "v7fs_impl.h"
431.1Such#include "v7fs_inode.h"
441.1Such
451.1Suchstruct v7fs_mount {
461.1Such	struct mount *mountp;
471.1Such	struct vnode *devvp;		/* block device mounted vnode */
481.1Such	struct v7fs_self *core;		/* filesystem dependent implementation*/
491.1Such};
501.1Such
511.1Suchstruct v7fs_node {
521.1Such	struct genfs_node gnode;
531.1Such	struct v7fs_inode inode; /* filesystem dependent implementation */
541.1Such	struct vnode *vnode;		/* back-link */
551.1Such	struct v7fs_mount *v7fsmount;	/* our filesystem */
561.1Such	struct lockf *lockf;		/* advlock */
571.1Such
581.1Such	int update_ctime;
591.1Such	int update_atime;
601.1Such	int update_mtime;
611.1Such};
621.1Such
631.1Such#define	VFSTOV7FS(mp)	((struct v7fs_mount *)((mp)->mnt_data))
641.1Such
651.1Such__BEGIN_DECLS
661.1Such/* v-node ops. */
671.1Suchint v7fs_lookup(void *);
681.1Suchint v7fs_create(void *);
691.1Suchint v7fs_open(void *);
701.1Suchint v7fs_close(void *);
711.1Suchint v7fs_access(void *);
721.1Suchint v7fs_getattr(void *);
731.1Suchint v7fs_setattr(void *);
741.1Suchint v7fs_read(void *);
751.1Suchint v7fs_write(void *);
761.1Suchint v7fs_fsync(void *);
771.1Suchint v7fs_remove(void *);
781.1Suchint v7fs_rename(void *);
791.1Suchint v7fs_readdir(void *);
801.1Suchint v7fs_inactive(void *);
811.1Suchint v7fs_reclaim(void *);
821.1Suchint v7fs_bmap(void *);
831.1Suchint v7fs_strategy(void *);
841.1Suchint v7fs_print(void *);
851.1Suchint v7fs_advlock(void *);
861.1Suchint v7fs_pathconf(void *);
871.1Such
881.1Suchint v7fs_link(void *);
891.1Suchint v7fs_symlink(void *);
901.1Suchint v7fs_readlink(void *);
911.1Such
921.1Suchint v7fs_mkdir(void *);
931.1Suchint v7fs_rmdir(void *);
941.1Such
951.1Suchint v7fs_mknod(void *);
961.1Such
971.1Such/* vfs ops. */
981.1SuchVFS_PROTOS(v7fs);
991.1Such
1001.1Suchint v7fs_mountroot(void);
1011.1Suchextern int (**v7fs_vnodeop_p)(void *);
1021.1Suchextern int (**v7fs_specop_p)(void *);
1031.1Suchextern int (**v7fs_fifoop_p)(void *);
1041.1Such
1051.1Such/* genfs ops */
1061.1Suchint v7fs_gop_alloc(struct vnode *, off_t, off_t, int, kauth_cred_t);
1071.1Suchextern const struct genfs_ops v7fs_genfsops;
1081.1Such
1091.1Such/* internal service */
1101.1Suchint v7fs_update(struct vnode *, const struct timespec *,
1111.1Such    const struct timespec *, int);
1121.1Such__END_DECLS
1131.1Such#endif /* _FS_V7FS_EXTERN_H_ */
114