/* $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

#ident		"$Header: ufsmount.h 1.11 89/08/07 $"

#ifndef	_SYS_UFSMOUNT_H_

/*
 * ufsmount.h
 *	UNIX file-system mount structures.
 */

/* $Log:	ufsmount.h,v $
 */

/*
 * Mount structure.  One allocated on every mount.
 */
struct	mount {
	struct vfs	m_vfs;		/* vfs structure for this filesystem */
	struct vnode	*m_devvp;	/* vnode for block device mounted */
#define m_dev	m_devvp->v_rdev
	struct buf	*m_bufp;	/* pointer to superblock */
	lock_t		m_lock;		/* lock for unmount/fhtovp race */
	ushort		m_count;	/* # processes in fhtovp() */
	ushort		m_qflags;	/* QUOTA: filesystem flags */
	struct inode	*m_qinod;	/* QUOTA: pointer to quota file */
	ulong		m_btimelimit;	/* QUOTA: block time limit */
	ulong		m_ftimelimit;	/* QUOTA: file time limit */
	ulong		m_qcnt;		/* QUOTA: # dquot active structures */
};

#ifdef	INKERNEL
/*
 * Convert vfs ptr to mount ptr. ONLY WORKS IF m_vfs IS FIRST.
 */
#define VFSTOM(VFSP)	((struct mount *)(VFSP))

extern	struct	mount	*mounttab;	/* mount table start */


/*
 * Operations
 */
struct	mount	*getmp();
struct	mount	*getmpbydev();
#endif	/* INKERNEL */

#define	_SYS_UFSMOUNT_H_
#endif	/* _SYS_UFSMOUNT_H_ */
