jfs_superblock.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright (C) International Business Machines Corp., 2000-2003
  4. */
  5. #ifndef _H_JFS_SUPERBLOCK
  6. #define _H_JFS_SUPERBLOCK
  7. #include <linux/uuid.h>
  8. /*
  9. * make the magic number something a human could read
  10. */
  11. #define JFS_MAGIC "JFS1" /* Magic word */
  12. #define JFS_VERSION 2 /* Version number: Version 2 */
  13. #define LV_NAME_SIZE 11 /* MUST BE 11 for OS/2 boot sector */
  14. /*
  15. * aggregate superblock
  16. *
  17. * The name superblock is too close to super_block, so the name has been
  18. * changed to jfs_superblock. The utilities are still using the old name.
  19. */
  20. struct jfs_superblock {
  21. char s_magic[4]; /* 4: magic number */
  22. __le32 s_version; /* 4: version number */
  23. __le64 s_size; /* 8: aggregate size in hardware/LVM blocks;
  24. * VFS: number of blocks
  25. */
  26. __le32 s_bsize; /* 4: aggregate block size in bytes;
  27. * VFS: fragment size
  28. */
  29. __le16 s_l2bsize; /* 2: log2 of s_bsize */
  30. __le16 s_l2bfactor; /* 2: log2(s_bsize/hardware block size) */
  31. __le32 s_pbsize; /* 4: hardware/LVM block size in bytes */
  32. __le16 s_l2pbsize; /* 2: log2 of s_pbsize */
  33. __le16 pad; /* 2: padding necessary for alignment */
  34. __le32 s_agsize; /* 4: allocation group size in aggr. blocks */
  35. __le32 s_flag; /* 4: aggregate attributes:
  36. * see jfs_filsys.h
  37. */
  38. __le32 s_state; /* 4: mount/unmount/recovery state:
  39. * see jfs_filsys.h
  40. */
  41. __le32 s_compress; /* 4: > 0 if data compression */
  42. pxd_t s_ait2; /* 8: first extent of secondary
  43. * aggregate inode table
  44. */
  45. pxd_t s_aim2; /* 8: first extent of secondary
  46. * aggregate inode map
  47. */
  48. __le32 s_logdev; /* 4: device address of log */
  49. __le32 s_logserial; /* 4: log serial number at aggregate mount */
  50. pxd_t s_logpxd; /* 8: inline log extent */
  51. pxd_t s_fsckpxd; /* 8: inline fsck work space extent */
  52. struct timestruc_t s_time; /* 8: time last updated */
  53. __le32 s_fsckloglen; /* 4: Number of filesystem blocks reserved for
  54. * the fsck service log.
  55. * N.B. These blocks are divided among the
  56. * versions kept. This is not a per
  57. * version size.
  58. * N.B. These blocks are included in the
  59. * length field of s_fsckpxd.
  60. */
  61. s8 s_fscklog; /* 1: which fsck service log is most recent
  62. * 0 => no service log data yet
  63. * 1 => the first one
  64. * 2 => the 2nd one
  65. */
  66. char s_fpack[11]; /* 11: file system volume name
  67. * N.B. This must be 11 bytes to
  68. * conform with the OS/2 BootSector
  69. * requirements
  70. * Only used when s_version is 1
  71. */
  72. /* extendfs() parameter under s_state & FM_EXTENDFS */
  73. __le64 s_xsize; /* 8: extendfs s_size */
  74. pxd_t s_xfsckpxd; /* 8: extendfs fsckpxd */
  75. pxd_t s_xlogpxd; /* 8: extendfs logpxd */
  76. uuid_t s_uuid; /* 16: 128-bit uuid for volume */
  77. char s_label[16]; /* 16: volume label */
  78. uuid_t s_loguuid; /* 16: 128-bit uuid for log device */
  79. };
  80. extern int readSuper(struct super_block *, struct buffer_head **);
  81. extern int updateSuper(struct super_block *, uint);
  82. __printf(2, 3)
  83. extern void jfs_error(struct super_block *, const char *, ...);
  84. extern int jfs_mount(struct super_block *);
  85. extern int jfs_mount_rw(struct super_block *, int);
  86. extern int jfs_umount(struct super_block *);
  87. extern int jfs_umount_rw(struct super_block *);
  88. extern int jfs_extendfs(struct super_block *, s64, int);
  89. extern struct task_struct *jfsIOthread;
  90. extern struct task_struct *jfsSyncThread;
  91. #endif /*_H_JFS_SUPERBLOCK */