ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / linux / efs_fs_sb.h
1 /*
2  * efs_fs_sb.h
3  *
4  * Copyright (c) 1999 Al Smith
5  *
6  * Portions derived from IRIX header files (c) 1988 Silicon Graphics
7  */
8
9 #ifndef __EFS_FS_SB_H__
10 #define __EFS_FS_SB_H__
11
12 /* statfs() magic number for EFS */
13 #define EFS_SUPER_MAGIC 0x414A53
14
15 /* EFS superblock magic numbers */
16 #define EFS_MAGIC       0x072959
17 #define EFS_NEWMAGIC    0x07295a
18
19 #define IS_EFS_MAGIC(x) ((x == EFS_MAGIC) || (x == EFS_NEWMAGIC))
20
21 #define EFS_SUPER               1
22 #define EFS_ROOTINODE           2
23
24 /* efs superblock on disk */
25 struct efs_super {
26         int32_t         fs_size;        /* size of filesystem, in sectors */
27         int32_t         fs_firstcg;     /* bb offset to first cg */
28         int32_t         fs_cgfsize;     /* size of cylinder group in bb's */
29         short           fs_cgisize;     /* bb's of inodes per cylinder group */
30         short           fs_sectors;     /* sectors per track */
31         short           fs_heads;       /* heads per cylinder */
32         short           fs_ncg;         /* # of cylinder groups in filesystem */
33         short           fs_dirty;       /* fs needs to be fsck'd */
34         int32_t         fs_time;        /* last super-block update */
35         int32_t         fs_magic;       /* magic number */
36         char            fs_fname[6];    /* file system name */
37         char            fs_fpack[6];    /* file system pack name */
38         int32_t         fs_bmsize;      /* size of bitmap in bytes */
39         int32_t         fs_tfree;       /* total free data blocks */
40         int32_t         fs_tinode;      /* total free inodes */
41         int32_t         fs_bmblock;     /* bitmap location. */
42         int32_t         fs_replsb;      /* Location of replicated superblock. */
43         int32_t         fs_lastialloc;  /* last allocated inode */
44         char            fs_spare[20];   /* space for expansion - MUST BE ZERO */
45         int32_t         fs_checksum;    /* checksum of volume portion of fs */
46 };
47
48 /* efs superblock information in memory */
49 struct efs_sb_info {
50         int32_t fs_magic;       /* superblock magic number */
51         int32_t fs_start;       /* first block of filesystem */
52         int32_t first_block;    /* first data block in filesystem */
53         int32_t total_blocks;   /* total number of blocks in filesystem */
54         int32_t group_size;     /* # of blocks a group consists of */ 
55         int32_t data_free;      /* # of free data blocks */
56         int32_t inode_free;     /* # of free inodes */
57         short   inode_blocks;   /* # of blocks used for inodes in every grp */
58         short   total_groups;   /* # of groups */
59 };
60
61 #endif /* __EFS_FS_SB_H__ */
62