1 /* 2 * linux/include/linux/ext3_fs_sb.h 3 * 4 * Copyright (C) 1992, 1993, 1994, 1995 5 * Remy Card (card@masi.ibp.fr) 6 * Laboratoire MASI - Institut Blaise Pascal 7 * Universite Pierre et Marie Curie (Paris VI) 8 * 9 * from 10 * 11 * linux/include/linux/minix_fs_sb.h 12 * 13 * Copyright (C) 1991, 1992 Linus Torvalds 14 */ 15 16 #ifndef _LINUX_EXT3_FS_SB 17 #define _LINUX_EXT3_FS_SB 18 19 #ifdef __KERNEL__ 20 #include <linux/timer.h> 21 #include <linux/wait.h> 22 #endif 23 24 /* 25 * The following is not needed anymore since the descriptors buffer 26 * heads are now dynamically allocated 27 */ 28 /* #define EXT3_MAX_GROUP_DESC 8 */ 29 30 #define EXT3_MAX_GROUP_LOADED 8 31 32 /* 33 * third extended-fs super-block data in memory 34 */ 35 struct ext3_sb_info { 36 unsigned long s_frag_size; /* Size of a fragment in bytes */ 37 unsigned long s_frags_per_block;/* Number of fragments per block */ 38 unsigned long s_inodes_per_block;/* Number of inodes per block */ 39 unsigned long s_frags_per_group;/* Number of fragments in a group */ 40 unsigned long s_blocks_per_group;/* Number of blocks in a group */ 41 unsigned long s_inodes_per_group;/* Number of inodes in a group */ 42 unsigned long s_itb_per_group; /* Number of inode table blocks per group */ 43 unsigned long s_gdb_count; /* Number of group descriptor blocks */ 44 unsigned long s_desc_per_block; /* Number of group descriptors per block */ 45 unsigned long s_groups_count; /* Number of groups in the fs */ 46 struct buffer_head * s_sbh; /* Buffer containing the super block */ 47 struct ext3_super_block * s_es; /* Pointer to the super block in the buffer */ 48 struct buffer_head ** s_group_desc; 49 unsigned short s_loaded_inode_bitmaps; 50 unsigned short s_loaded_block_bitmaps; 51 unsigned long s_inode_bitmap_number[EXT3_MAX_GROUP_LOADED]; 52 struct buffer_head * s_inode_bitmap[EXT3_MAX_GROUP_LOADED]; 53 unsigned long s_block_bitmap_number[EXT3_MAX_GROUP_LOADED]; 54 struct buffer_head * s_block_bitmap[EXT3_MAX_GROUP_LOADED]; 55 unsigned long s_mount_opt; 56 uid_t s_resuid; 57 gid_t s_resgid; 58 unsigned short s_mount_state; 59 unsigned short s_pad; 60 int s_addr_per_block_bits; 61 int s_desc_per_block_bits; 62 int s_inode_size; 63 int s_first_ino; 64 u32 s_next_generation; 65 66 /* Journaling */ 67 struct inode * s_journal_inode; 68 struct journal_s * s_journal; 69 struct list_head s_orphan; 70 unsigned long s_commit_interval; 71 struct block_device *journal_bdev; 72 #ifdef CONFIG_JBD_DEBUG 73 struct timer_list turn_ro_timer; /* For turning read-only (crash simulation) */ 74 wait_queue_head_t ro_wait_queue; /* For people waiting for the fs to go read-only */ 75 #endif 76 }; 77 78 #endif /* _LINUX_EXT3_FS_SB */ 79