efs_fs_sb.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #ifndef __EFS_FS_SB_H__
  9. #define __EFS_FS_SB_H__
  10. #include <linux/types.h>
  11. #include <linux/magic.h>
  12. /* EFS superblock magic numbers */
  13. #define EFS_MAGIC 0x072959
  14. #define EFS_NEWMAGIC 0x07295a
  15. #define IS_EFS_MAGIC(x) ((x == EFS_MAGIC) || (x == EFS_NEWMAGIC))
  16. #define EFS_SUPER 1
  17. #define EFS_ROOTINODE 2
  18. /* efs superblock on disk */
  19. struct efs_super {
  20. __be32 fs_size; /* size of filesystem, in sectors */
  21. __be32 fs_firstcg; /* bb offset to first cg */
  22. __be32 fs_cgfsize; /* size of cylinder group in bb's */
  23. __be16 fs_cgisize; /* bb's of inodes per cylinder group */
  24. __be16 fs_sectors; /* sectors per track */
  25. __be16 fs_heads; /* heads per cylinder */
  26. __be16 fs_ncg; /* # of cylinder groups in filesystem */
  27. __be16 fs_dirty; /* fs needs to be fsck'd */
  28. __be32 fs_time; /* last super-block update */
  29. __be32 fs_magic; /* magic number */
  30. char fs_fname[6]; /* file system name */
  31. char fs_fpack[6]; /* file system pack name */
  32. __be32 fs_bmsize; /* size of bitmap in bytes */
  33. __be32 fs_tfree; /* total free data blocks */
  34. __be32 fs_tinode; /* total free inodes */
  35. __be32 fs_bmblock; /* bitmap location. */
  36. __be32 fs_replsb; /* Location of replicated superblock. */
  37. __be32 fs_lastialloc; /* last allocated inode */
  38. char fs_spare[20]; /* space for expansion - MUST BE ZERO */
  39. __be32 fs_checksum; /* checksum of volume portion of fs */
  40. };
  41. /* efs superblock information in memory */
  42. struct efs_sb_info {
  43. __u32 fs_magic; /* superblock magic number */
  44. __u32 fs_start; /* first block of filesystem */
  45. __u32 first_block; /* first data block in filesystem */
  46. __u32 total_blocks; /* total number of blocks in filesystem */
  47. __u32 group_size; /* # of blocks a group consists of */
  48. __u32 data_free; /* # of free data blocks */
  49. __u32 inode_free; /* # of free inodes */
  50. __u16 inode_blocks; /* # of blocks used for inodes in every grp */
  51. __u16 total_groups; /* # of groups */
  52. };
  53. #endif /* __EFS_FS_SB_H__ */