1 /* SPDX-License-Identifier: GPL-2.0-or-later * << 2 /* 1 /* 3 * Copyright (C) International Business Mach 2 * Copyright (C) International Business Machines Corp., 2000-2003 >> 3 * >> 4 * This program is free software; you can redistribute it and/or modify >> 5 * it under the terms of the GNU General Public License as published by >> 6 * the Free Software Foundation; either version 2 of the License, or >> 7 * (at your option) any later version. >> 8 * >> 9 * This program is distributed in the hope that it will be useful, >> 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of >> 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See >> 12 * the GNU General Public License for more details. >> 13 * >> 14 * You should have received a copy of the GNU General Public License >> 15 * along with this program; if not, write to the Free Software >> 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 4 */ 17 */ 5 #ifndef _H_JFS_SUPERBLOCK 18 #ifndef _H_JFS_SUPERBLOCK 6 #define _H_JFS_SUPERBLOCK 19 #define _H_JFS_SUPERBLOCK 7 20 8 #include <linux/uuid.h> << 9 << 10 /* 21 /* 11 * make the magic number something a human cou 22 * make the magic number something a human could read 12 */ 23 */ 13 #define JFS_MAGIC "JFS1" /* Magic word !! 24 #define JFS_MAGIC "JFS1" /* Magic word */ 14 25 15 #define JFS_VERSION 2 /* Version num 26 #define JFS_VERSION 2 /* Version number: Version 2 */ 16 27 17 #define LV_NAME_SIZE 11 /* MUST BE 11 28 #define LV_NAME_SIZE 11 /* MUST BE 11 for OS/2 boot sector */ 18 29 19 /* !! 30 /* 20 * aggregate superblock !! 31 * aggregate superblock 21 * 32 * 22 * The name superblock is too close to super_b 33 * The name superblock is too close to super_block, so the name has been 23 * changed to jfs_superblock. The utilities a 34 * changed to jfs_superblock. The utilities are still using the old name. 24 */ 35 */ 25 struct jfs_superblock { 36 struct jfs_superblock { 26 char s_magic[4]; /* 4: magic nu 37 char s_magic[4]; /* 4: magic number */ 27 __le32 s_version; /* 4: version !! 38 u32 s_version; /* 4: version number */ 28 39 29 __le64 s_size; /* 8: aggregat !! 40 s64 s_size; /* 8: aggregate size in hardware/LVM blocks; 30 * VFS: number 41 * VFS: number of blocks 31 */ 42 */ 32 __le32 s_bsize; /* 4: aggregat !! 43 s32 s_bsize; /* 4: aggregate block size in bytes; 33 * VFS: fragme 44 * VFS: fragment size 34 */ 45 */ 35 __le16 s_l2bsize; /* 2: log2 of !! 46 s16 s_l2bsize; /* 2: log2 of s_bsize */ 36 __le16 s_l2bfactor; /* 2: log2(s_b !! 47 s16 s_l2bfactor; /* 2: log2(s_bsize/hardware block size) */ 37 __le32 s_pbsize; /* 4: hardware !! 48 s32 s_pbsize; /* 4: hardware/LVM block size in bytes */ 38 __le16 s_l2pbsize; /* 2: log2 of !! 49 s16 s_l2pbsize; /* 2: log2 of s_pbsize */ 39 __le16 pad; /* 2: padding !! 50 s16 pad; /* 2: padding necessary for alignment */ 40 51 41 __le32 s_agsize; /* 4: allocati !! 52 u32 s_agsize; /* 4: allocation group size in aggr. blocks */ 42 53 43 __le32 s_flag; /* 4: aggregat !! 54 u32 s_flag; /* 4: aggregate attributes: 44 * see jfs_ 55 * see jfs_filsys.h 45 */ 56 */ 46 __le32 s_state; /* 4: mount/un !! 57 u32 s_state; /* 4: mount/unmount/recovery state: 47 * see jfs_ 58 * see jfs_filsys.h 48 */ 59 */ 49 __le32 s_compress; /* 4: !! 60 s32 s_compress; /* 4: > 0 if data compression */ 50 61 51 pxd_t s_ait2; /* 8: first ex 62 pxd_t s_ait2; /* 8: first extent of secondary 52 * aggregat 63 * aggregate inode table 53 */ 64 */ 54 65 55 pxd_t s_aim2; /* 8: first ex 66 pxd_t s_aim2; /* 8: first extent of secondary 56 * aggregat 67 * aggregate inode map 57 */ 68 */ 58 __le32 s_logdev; /* 4: !! 69 u32 s_logdev; /* 4: device address of log */ 59 __le32 s_logserial; /* 4: log seri !! 70 s32 s_logserial; /* 4: log serial number at aggregate mount */ 60 pxd_t s_logpxd; /* 8: inline l 71 pxd_t s_logpxd; /* 8: inline log extent */ 61 72 62 pxd_t s_fsckpxd; /* 8: inline f 73 pxd_t s_fsckpxd; /* 8: inline fsck work space extent */ 63 74 64 struct timestruc_t s_time; /* 8: 75 struct timestruc_t s_time; /* 8: time last updated */ 65 76 66 __le32 s_fsckloglen; /* 4: Number o !! 77 s32 s_fsckloglen; /* 4: Number of filesystem blocks reserved for 67 * the fsck !! 78 * the fsck service log. 68 * N.B. The 79 * N.B. These blocks are divided among the 69 * ver 80 * versions kept. This is not a per 70 * ver 81 * version size. 71 * N.B. The !! 82 * N.B. These blocks are included in the 72 * len 83 * length field of s_fsckpxd. 73 */ 84 */ 74 s8 s_fscklog; /* 1: which fs 85 s8 s_fscklog; /* 1: which fsck service log is most recent 75 * 0 => no 86 * 0 => no service log data yet 76 * 1 => the 87 * 1 => the first one 77 * 2 => the 88 * 2 => the 2nd one 78 */ 89 */ 79 char s_fpack[11]; /* 11: file sy !! 90 char s_fpack[11]; /* 11: file system volume name 80 * N.B. Th 91 * N.B. This must be 11 bytes to 81 * co 92 * conform with the OS/2 BootSector 82 * re 93 * requirements 83 * On 94 * Only used when s_version is 1 84 */ 95 */ 85 96 86 /* extendfs() parameter under s_state 97 /* extendfs() parameter under s_state & FM_EXTENDFS */ 87 __le64 s_xsize; /* 8: extendfs !! 98 s64 s_xsize; /* 8: extendfs s_size */ 88 pxd_t s_xfsckpxd; /* 8: extendfs 99 pxd_t s_xfsckpxd; /* 8: extendfs fsckpxd */ 89 pxd_t s_xlogpxd; /* 8: extendfs 100 pxd_t s_xlogpxd; /* 8: extendfs logpxd */ 90 uuid_t s_uuid; /* 16: 128-bit !! 101 /* - 128 byte boundary - */ >> 102 >> 103 char s_uuid[16]; /* 16: 128-bit uuid for volume */ 91 char s_label[16]; /* 16: volume 104 char s_label[16]; /* 16: volume label */ 92 uuid_t s_loguuid; /* 16: 128-bit !! 105 char s_loguuid[16]; /* 16: 128-bit uuid for log device */ 93 106 94 }; 107 }; 95 108 96 extern int readSuper(struct super_block *, str 109 extern int readSuper(struct super_block *, struct buffer_head **); 97 extern int updateSuper(struct super_block *, u 110 extern int updateSuper(struct super_block *, uint); 98 __printf(2, 3) << 99 extern void jfs_error(struct super_block *, co 111 extern void jfs_error(struct super_block *, const char *, ...); 100 extern int jfs_mount(struct super_block *); << 101 extern int jfs_mount_rw(struct super_block *, << 102 extern int jfs_umount(struct super_block *); << 103 extern int jfs_umount_rw(struct super_block *) << 104 extern int jfs_extendfs(struct super_block *, << 105 << 106 extern struct task_struct *jfsIOthread; << 107 extern struct task_struct *jfsSyncThread; << 108 112 109 #endif /*_H_JFS_SUPERBLOCK */ 113 #endif /*_H_JFS_SUPERBLOCK */ 110 114
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.