EXT2FS: support variable inode size.
[dragonfly.git] / sys / vfs / gnu / ext2fs / ext2_fs_sb.h
... / ...
CommitLineData
1/*
2 * modified for EXT2FS support in Lites 1.1
3 *
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
9 *
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)
14 *
15 * from
16 *
17 * linux/include/linux/minix_fs_sb.h
18 *
19 * Copyright (C) 1991, 1992 Linus Torvalds
20 */
21
22#ifndef _LINUX_EXT2_FS_SB
23#define _LINUX_EXT2_FS_SB
24
25/*
26 * The following is not needed anymore since the descriptors buffer
27 * heads are now dynamically allocated
28 */
29/* #define EXT2_MAX_GROUP_DESC 8 */
30
31#define EXT2_MAX_GROUP_LOADED 8
32
33#define buffer_head buf
34#define MAXMNTLEN 512
35
36/*
37 * second extended-fs super-block data in memory
38 */
39struct 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
72 */
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 */
81
82 char fs_fsmnt[MAXMNTLEN]; /* name mounted on */
83};
84
85#endif /* _LINUX_EXT2_FS_SB */