xref: /original-bsd/sys/ufs/ffs/ufsmount.h (revision ba762ddc)
1 /*
2  * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)ufsmount.h	7.8 (Berkeley) 04/16/91
8  */
9 
10 /*
11  * Mount structure.
12  * One allocated on every mount.
13  * Used to find the super block.
14  */
15 struct	ufsmount {
16 	struct	mount *um_mountp;	/* vfs structure for this filesystem */
17 	dev_t	um_dev;			/* device mounted */
18 	struct	vnode *um_devvp;	/* vnode for block device mounted */
19 	struct	fs *um_fs;		/* pointer to superblock */
20 	struct	vnode *um_quotas[MAXQUOTAS]; /* pointer to quota files */
21 	struct	ucred *um_cred[MAXQUOTAS]; /* cred for access to quota file */
22 	time_t	um_btime[MAXQUOTAS];	/* block quota time limit */
23 	time_t	um_itime[MAXQUOTAS];	/* inode quota time limit */
24 	char	um_qflags[MAXQUOTAS];	/* quota specific flags, see below */
25 };
26 /*
27  * Flags describing the state of quotas.
28  */
29 #define	QTF_OPENING	0x01		/* Q_QUOTAON in progress */
30 #define	QTF_CLOSING	0x02		/* Q_QUOTAOFF in progress */
31 
32 #ifdef KERNEL
33 /*
34  * Convert mount ptr to ufsmount ptr.
35  */
36 #define VFSTOUFS(mp)	((struct ufsmount *)((mp)->mnt_data))
37 #endif /* KERNEL */
38 
39 /*
40  * Prototypes for UFS mount operations
41  */
42 int	ufs_mount __P((
43 		struct mount *mp,
44 		char *path,
45 		caddr_t data,
46 		struct nameidata *ndp,
47 		struct proc *p));
48 int	ufs_start __P((
49 		struct mount *mp,
50 		int flags,
51 		struct proc *p));
52 int	ufs_unmount __P((
53 		struct mount *mp,
54 		int mntflags,
55 		struct proc *p));
56 int	ufs_root __P((
57 		struct mount *mp,
58 		struct vnode **vpp));
59 int	ufs_quotactl __P((
60 		struct mount *mp,
61 		int cmds,
62 		int uid,	/* should be uid_t */
63 		caddr_t arg,
64 		struct proc *p));
65 int	ufs_statfs __P((
66 		struct mount *mp,
67 		struct statfs *sbp,
68 		struct proc *p));
69 int	ufs_sync __P((
70 		struct mount *mp,
71 		int waitfor));
72 int	ufs_fhtovp __P((
73 		struct mount *mp,
74 		struct fid *fhp,
75 		struct vnode **vpp));
76 int	ufs_vptofh __P((
77 		struct vnode *vp,
78 		struct fid *fhp));
79 int	ufs_init __P(());
80