Some cleanup after addition of TRIM support.
[dragonfly.git] / sys / vfs / gnu / ext2fs / ext2_fs_sb.h
bloba5b9123f3d155ed7f131e5a5a20250fcbe3be6f0
1 /*
2 * modified for EXT2FS support in Lites 1.1
4 * Aug 1995, Godmar Back (gback@cs.utah.edu)
5 * University of Utah, Department of Computer Science
6 */
7 /*
8 * linux/include/linux/ext2_fs_sb.h
10 * Copyright (C) 1992, 1993, 1994, 1995
11 * Remy Card (card@masi.ibp.fr)
12 * Laboratoire MASI - Institut Blaise Pascal
13 * Universite Pierre et Marie Curie (Paris VI)
15 * from
17 * linux/include/linux/minix_fs_sb.h
19 * Copyright (C) 1991, 1992 Linus Torvalds
22 #ifndef _LINUX_EXT2_FS_SB
23 #define _LINUX_EXT2_FS_SB
26 * The following is not needed anymore since the descriptors buffer
27 * heads are now dynamically allocated
29 /* #define EXT2_MAX_GROUP_DESC 8 */
31 #define EXT2_MAX_GROUP_LOADED 8
33 #define buffer_head buf
34 #define MAXMNTLEN 512
37 * second extended-fs super-block data in memory
39 struct ext2_sb_info {
40 unsigned long s_frag_size; /* Size of a fragment in bytes */
41 unsigned long s_frags_per_block;/* Number of fragments per block */
42 unsigned long s_inodes_per_block;/* Number of inodes per block */
43 unsigned long s_frags_per_group;/* Number of fragments in a group */
44 unsigned long s_blocks_per_group;/* Number of blocks in a group */
45 unsigned long s_inodes_per_group;/* Number of inodes in a group */
46 unsigned long s_itb_per_group; /* Number of inode table blocks per group */
47 unsigned long s_db_per_group; /* Number of descriptor blocks per group */
48 unsigned long s_desc_per_block; /* Number of group descriptors per block */
49 unsigned long s_groups_count; /* Number of groups in the fs */
50 struct buffer_head * s_sbh; /* Buffer containing the super block */
51 struct ext2_super_block * s_es; /* Pointer to the super block in the buffer */
52 struct buffer_head ** s_group_desc;
53 unsigned short s_loaded_inode_bitmaps;
54 unsigned short s_loaded_block_bitmaps;
55 unsigned long s_inode_bitmap_number[EXT2_MAX_GROUP_LOADED];
56 struct buffer_head * s_inode_bitmap[EXT2_MAX_GROUP_LOADED];
57 unsigned long s_block_bitmap_number[EXT2_MAX_GROUP_LOADED];
58 struct buffer_head * s_block_bitmap[EXT2_MAX_GROUP_LOADED];
59 int s_rename_lock;
60 unsigned long s_mount_opt;
61 #ifdef notyet
62 unsigned short s_resuid;
63 unsigned short s_resgid;
64 #endif
65 unsigned short s_inode_size;
66 unsigned int s_first_ino;
67 unsigned short s_mount_state;
68 /*
69 stuff that FFS keeps in its super block or that linux
70 has in its non-ext2 specific super block and which is
71 generally considered useful
73 unsigned long s_blocksize;
74 unsigned long s_blocksize_bits;
75 unsigned int s_bshift; /* = log2(s_blocksize) */
76 quad_t s_qbmask; /* = s_blocksize - 1 */
77 unsigned int s_fsbtodb; /* shift to get disk block */
78 char s_rd_only; /* read-only */
79 char s_dirt; /* fs modified flag */
80 char s_wasvalid; /* valid at mount time */
82 char fs_fsmnt[MAXMNTLEN]; /* name mounted on */
85 #endif /* _LINUX_EXT2_FS_SB */