disallow creation of files in removed directories
[unix-history] / usr / src / sys / ufs / ffs / ufsmount.h
index 551c976..381e3b3 100644 (file)
@@ -1,23 +1,44 @@
 /*
 /*
- * Copyright (c) 1982 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
+ * All rights reserved.
  *
  *
- *     @(#)ufsmount.h  6.2 (Berkeley) %G%
+ * %sccs.include.redist.c%
+ *
+ *     @(#)ufsmount.h  7.13 (Berkeley) %G%
  */
 
  */
 
+struct buf;
+struct inode;
+struct nameidata;
+struct timeval;
+struct ucred;
+struct uio;
+struct vnode;
+
+/* This structure describes the UFS specific mount structure data. */
+struct ufsmount {
+       struct  mount *um_mountp;               /* filesystem vfs structure */
+       dev_t   um_dev;                         /* device mounted */
+       struct  vnode *um_devvp;                /* block device mounted vnode */
+       union {                                 /* pointer to superblock */
+               struct  lfs *lfs;               /* LFS */
+               struct  fs *fs;                 /* FFS */
+       } ufsmount_u;
+#define        um_fs   ufsmount_u.fs
+#define        um_lfs  ufsmount_u.lfs
+       struct  vnode *um_quotas[MAXQUOTAS];    /* pointer to quota files */
+       struct  ucred *um_cred[MAXQUOTAS];      /* quota file access cred */
+       time_t  um_btime[MAXQUOTAS];            /* block quota time limit */
+       time_t  um_itime[MAXQUOTAS];            /* inode quota time limit */
+       char    um_qflags[MAXQUOTAS];           /* quota specific flags */
+       struct  netaddrhash um_defexported;     /* Default export */
+       struct  netaddrhash *um_netaddr[NETHASHSZ+1]; /* Net addr hash lists */
+};
 /*
 /*
- * Mount structure.
- * One allocated on every mount.
- * Used to find the super block.
+ * Flags describing the state of quotas.
  */
  */
-struct mount
-{
-       dev_t   m_dev;          /* device mounted */
-       struct  buf *m_bufp;    /* pointer to superblock */
-       struct  inode *m_inodp; /* pointer to mounted on inode */
-       struct  inode *m_qinod; /* QUOTA: pointer to quota file */
-};
-#ifdef KERNEL
-struct mount mount[NMOUNT];
-#endif
+#define        QTF_OPENING     0x01                    /* Q_QUOTAON in progress */
+#define        QTF_CLOSING     0x02                    /* Q_QUOTAOFF in progress */
+
+/* Convert mount ptr to ufsmount ptr. */
+#define VFSTOUFS(mp)   ((struct ufsmount *)((mp)->mnt_data))