xref: /original-bsd/sys/ufs/ufs/ufsmount.h (revision 963f8367)
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.9 (Berkeley) 05/08/91
8  */
9 
10 /*
11  * This structure describes the UFS specific mount structure data.
12  */
13 struct	ufsmount {
14 	struct	mount *um_mountp;	/* vfs structure for this filesystem */
15 	dev_t	um_dev;			/* device mounted */
16 	struct	vnode *um_devvp;	/* vnode for block device mounted */
17 	struct	fs *um_fs;		/* pointer to superblock */
18 	struct	vnode *um_quotas[MAXQUOTAS]; /* pointer to quota files */
19 	struct	ucred *um_cred[MAXQUOTAS]; /* cred for access to quota file */
20 	time_t	um_btime[MAXQUOTAS];	/* block quota time limit */
21 	time_t	um_itime[MAXQUOTAS];	/* inode quota time limit */
22 	char	um_qflags[MAXQUOTAS];	/* quota specific flags, see below */
23 };
24 /*
25  * Flags describing the state of quotas.
26  */
27 #define	QTF_OPENING	0x01		/* Q_QUOTAON in progress */
28 #define	QTF_CLOSING	0x02		/* Q_QUOTAOFF in progress */
29 
30 #ifdef KERNEL
31 /*
32  * Convert mount ptr to ufsmount ptr.
33  */
34 #define VFSTOUFS(mp)	((struct ufsmount *)((mp)->mnt_data))
35 #endif /* KERNEL */
36 
37 /*
38  * Prototypes for UFS mount operations
39  */
40 int ufs_mount __P((struct mount *mp, char *path, caddr_t data,
41 	struct nameidata *ndp, struct proc *p));
42 int ufs_start __P((struct mount *mp, int flags, struct proc *p));
43 int ufs_unmount __P((struct mount *mp, int mntflags, struct proc *p));
44 int ufs_root __P((struct mount *mp, struct vnode **vpp));
45 int ufs_quotactl __P((struct mount *mp, int cmds, int uid, /* should be uid_t */
46 	caddr_t arg, struct proc *p));
47 int ufs_statfs __P((struct mount *mp, struct statfs *sbp, struct proc *p));
48 int ufs_sync __P((struct mount *mp, int waitfor));
49 int ufs_fhtovp __P((struct mount *mp, struct fid *fhp, struct vnode **vpp));
50 int ufs_vptofh __P((struct vnode *vp, struct fid *fhp));
51 int ufs_init __P(());
52