reorganization to move ufsmount ops to be vnode ops
[unix-history] / usr / src / sys / ufs / ffs / ufsmount.h
... / ...
CommitLineData
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.11 (Berkeley) %G%
8 */
9
10/*
11 * The root inode is the root of the file system. Inode 0 can't be used for
12 * normal purposes and historically bad blocks were linked to inode 1, thus
13 * the root inode is 2. (inode 1 is no longer used for this purpose, however
14 * numerous dump tapes make this assumption, so we are stuck with it).
15 */
16#define ROOTINO ((ino_t)2)
17
18struct buf;
19struct inode;
20struct nameidata;
21struct timeval;
22struct ucred;
23struct uio;
24struct vnode;
25
26/* This structure describes the UFS specific mount structure data. */
27struct ufsmount {
28 struct mount *um_mountp; /* filesystem vfs structure */
29 dev_t um_dev; /* device mounted */
30 struct vnode *um_devvp; /* block device mounted vnode */
31 union { /* pointer to superblock */
32 struct lfs *lfs; /* LFS */
33 struct fs *fs; /* FFS */
34 } ufsmount_u;
35#define um_fs ufsmount_u.fs
36#define um_lfs ufsmount_u.lfs
37 struct vnode *um_quotas[MAXQUOTAS]; /* pointer to quota files */
38 struct ucred *um_cred[MAXQUOTAS]; /* quota file access cred */
39 time_t um_btime[MAXQUOTAS]; /* block quota time limit */
40 time_t um_itime[MAXQUOTAS]; /* inode quota time limit */
41 char um_qflags[MAXQUOTAS]; /* quota specific flags */
42};
43/*
44 * Flags describing the state of quotas.
45 */
46#define QTF_OPENING 0x01 /* Q_QUOTAON in progress */
47#define QTF_CLOSING 0x02 /* Q_QUOTAOFF in progress */
48
49/* Convert mount ptr to ufsmount ptr. */
50#define VFSTOUFS(mp) ((struct ufsmount *)((mp)->mnt_data))