#ifndef _ADOS_VFS_H
#define _ADOS_VFS_H

/***
Copyright (c) 1991, 1992 by Frank J. Edwards
See the file COPYRIGHT in this distribution for copyright details.
***/

#ident "$Id: ados_vfs.h,v 1.6 1992/12/13 03:08:32 root Exp root $"

#ifndef _ADOS_ANODE_H
# include "ados_anode.h"
#endif

/*
 *  The address of (struct ados) will be (struct anode *) for
 *  the anode of the root directory.  Use vfs_root for the head
 *  of the anodes-in-core linked list.
 */
struct ados {
    anode_t      *vfs_forw;	/* Linked list of free_anodes, */
    anode_t      *vfs_back;	/*   must match (struct anode) */
    anode_t       vfs_root;	/* Root anode and head of used_anode list */
    int           vfs_dos;	/* Which version of AmigaDOS filesystem? */
    int           vfs_bufbits;	/* 512-byte block == 9 bits */
    int           vfs_nels;	/* # anodes */
    int           vfs_nelmax;	/* max # anodes */
    LONG         *vfs_bmap;	/* bitmaps */
    LONG          vfs_nbmap;	/* # of bytes of bitmap stored @ vfs_bmap */
    char         *vfs_fstr;	/* Holds filesystem (volume) name */
    struct vfs   *vfs_vfsp;
    vnode_t      *vfs_devvp;
};

/*
 *  The field named "vfs_dos", above, is a bitfield which describes the
 *  layout of the data on disk.  The SMALL_BLOCK bit is set if the FS
 *  uses the small block arrangement (such as OFS).  The DIR_CACHING
 *  bit is set to indicate that the "rd_dircache" and "ud_dircache"
 *  fields of (struct a_root) and (struct a_udir) may be non-zero.
 */
#define SMALL_BLOCK	0x01	/* Original "OFS" (old) filesystem */
#define DIR_CACHING	0x02	/* V3.0 "DCFS" (dir caching) filesystem */
#define CACHE_BMAPS	0x04	/* Cache the free block bitmaps */

#endif /* _ADOS_VFS_H */
