Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * efs_fs_sb.h
0004  *
0005  * Copyright (c) 1999 Al Smith
0006  *
0007  * Portions derived from IRIX header files (c) 1988 Silicon Graphics
0008  */
0009 
0010 #ifndef __EFS_FS_SB_H__
0011 #define __EFS_FS_SB_H__
0012 
0013 #include <linux/types.h>
0014 #include <linux/magic.h>
0015 
0016 /* EFS superblock magic numbers */
0017 #define EFS_MAGIC   0x072959
0018 #define EFS_NEWMAGIC    0x07295a
0019 
0020 #define IS_EFS_MAGIC(x) ((x == EFS_MAGIC) || (x == EFS_NEWMAGIC))
0021 
0022 #define EFS_SUPER       1
0023 #define EFS_ROOTINODE       2
0024 
0025 /* efs superblock on disk */
0026 struct efs_super {
0027     __be32      fs_size;        /* size of filesystem, in sectors */
0028     __be32      fs_firstcg;     /* bb offset to first cg */
0029     __be32      fs_cgfsize;     /* size of cylinder group in bb's */
0030     __be16      fs_cgisize;     /* bb's of inodes per cylinder group */
0031     __be16      fs_sectors;     /* sectors per track */
0032     __be16      fs_heads;       /* heads per cylinder */
0033     __be16      fs_ncg;         /* # of cylinder groups in filesystem */
0034     __be16      fs_dirty;       /* fs needs to be fsck'd */
0035     __be32      fs_time;        /* last super-block update */
0036     __be32      fs_magic;       /* magic number */
0037     char        fs_fname[6];    /* file system name */
0038     char        fs_fpack[6];    /* file system pack name */
0039     __be32      fs_bmsize;      /* size of bitmap in bytes */
0040     __be32      fs_tfree;       /* total free data blocks */
0041     __be32      fs_tinode;      /* total free inodes */
0042     __be32      fs_bmblock;     /* bitmap location. */
0043     __be32      fs_replsb;      /* Location of replicated superblock. */
0044     __be32      fs_lastialloc;  /* last allocated inode */
0045     char        fs_spare[20];   /* space for expansion - MUST BE ZERO */
0046     __be32      fs_checksum;    /* checksum of volume portion of fs */
0047 };
0048 
0049 /* efs superblock information in memory */
0050 struct efs_sb_info {
0051     __u32   fs_magic;   /* superblock magic number */
0052     __u32   fs_start;   /* first block of filesystem */
0053     __u32   first_block;    /* first data block in filesystem */
0054     __u32   total_blocks;   /* total number of blocks in filesystem */
0055     __u32   group_size; /* # of blocks a group consists of */ 
0056     __u32   data_free;  /* # of free data blocks */
0057     __u32   inode_free; /* # of free inodes */
0058     __u16   inode_blocks;   /* # of blocks used for inodes in every grp */
0059     __u16   total_groups;   /* # of groups */
0060 };
0061 
0062 #endif /* __EFS_FS_SB_H__ */
0063