1 /* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)ufsmount.h 8.2 (Berkeley) 01/12/94 8 */ 9 10 struct buf; 11 struct inode; 12 struct nameidata; 13 struct timeval; 14 struct ucred; 15 struct uio; 16 struct vnode; 17 struct netexport; 18 19 /* This structure describes the UFS specific mount structure data. */ 20 struct ufsmount { 21 struct mount *um_mountp; /* filesystem vfs structure */ 22 dev_t um_dev; /* device mounted */ 23 struct vnode *um_devvp; /* block device mounted vnode */ 24 union { /* pointer to superblock */ 25 struct lfs *lfs; /* LFS */ 26 struct fs *fs; /* FFS */ 27 } ufsmount_u; 28 #define um_fs ufsmount_u.fs 29 #define um_lfs ufsmount_u.lfs 30 struct vnode *um_quotas[MAXQUOTAS]; /* pointer to quota files */ 31 struct ucred *um_cred[MAXQUOTAS]; /* quota file access cred */ 32 u_long um_nindir; /* indirect ptrs per block */ 33 u_long um_bptrtodb; /* indir ptr to disk block */ 34 u_long um_seqinc; /* inc between seq blocks */ 35 time_t um_btime[MAXQUOTAS]; /* block quota time limit */ 36 time_t um_itime[MAXQUOTAS]; /* inode quota time limit */ 37 char um_qflags[MAXQUOTAS]; /* quota specific flags */ 38 struct netexport um_export; /* export information */ 39 }; 40 /* 41 * Flags describing the state of quotas. 42 */ 43 #define QTF_OPENING 0x01 /* Q_QUOTAON in progress */ 44 #define QTF_CLOSING 0x02 /* Q_QUOTAOFF in progress */ 45 46 /* Convert mount ptr to ufsmount ptr. */ 47 #define VFSTOUFS(mp) ((struct ufsmount *)((mp)->mnt_data)) 48 49 /* 50 * Macros to access file system parameters in the ufsmount structure. 51 * Used by ufs_bmap. 52 */ 53 #define blkptrtodb(ump, b) ((b) << (ump)->um_bptrtodb) 54 #define is_sequential(ump, a, b) ((b) == (a) + ump->um_seqinc) 55 #define MNINDIR(ump) ((ump)->um_nindir) 56 57 58