FreeNOS
LinnSuperBlock.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 Niek Linnenbank
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 3 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 the
12  * 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, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef __FILESYSTEM_LINNSUPERBLOCK_H
19 #define __FILESYSTEM_LINNSUPERBLOCK_H
20 
21 #include <Types.h>
22 
37 #define LINN_SUPER_MAGIC0 0x4c696e6e
38 
40 #define LINN_SUPER_MAGIC1 0x512ea9b0
41 
52 #define LINN_SUPER_MAJOR 1
53 
55 #define LINN_SUPER_MINOR 0
56 
67 #define LINN_SUPER_VALID 0
68 
70 #define LINN_SUPER_UNCLEAN 1
71 
73 #define LINN_SUPER_CORRUPT 2
74 
85 #define LINN_SUPER_OFFSET 1024
86 
103 #define LINN_SUPER_NUM_PTRS(sb) \
104  ((sb)->blockSize / sizeof(u32))
105 
113 typedef struct LinnSuperBlock
114 {
136 }
138 
144 #endif /* __FILESYSTEM_LINNSUPERBLOCK_H */
LinnSuperBlock::state
le16 state
Describes the current status.
Definition: LinnSuperBlock.h:119
LinnSuperBlock::lastCheck
le32 lastCheck
Timestamp of the last check.
Definition: LinnSuperBlock.h:133
LinnSuperBlock::freeInodesCount
le32 freeInodesCount
Free inodes remaining.
Definition: LinnSuperBlock.h:128
LinnSuperBlock::majorRevision
le16 majorRevision
Filesystem major revision level.
Definition: LinnSuperBlock.h:117
Types.h
LinnSuperBlock::magic0
le32 magic0
Allows detection of valid superblocks.
Definition: LinnSuperBlock.h:115
LinnSuperBlock::magic1
le32 magic1
Allows detection of valid superblocks.
Definition: LinnSuperBlock.h:116
le16
u16 BITWISE le16
Unsigned 16-bit little endian number.
Definition: Types.h:112
LinnSuperBlock::mountTime
le32 mountTime
Last time we where mounted (seconds since 1970).
Definition: LinnSuperBlock.h:131
LinnSuperBlock::inodesCount
le32 inodesCount
Total number of inodes.
Definition: LinnSuperBlock.h:125
LinnSuperBlock::blocksPerGroup
le32 blocksPerGroup
Number of blocks per group.
Definition: LinnSuperBlock.h:122
LinnSuperBlock
struct LinnSuperBlock LinnSuperBlock
Linnenbank Filesystem (LinnFS) super block.
LinnSuperBlock::freeBlocksCount
le32 freeBlocksCount
Number of free data blocks.
Definition: LinnSuperBlock.h:127
LinnSuperBlock
Linnenbank Filesystem (LinnFS) super block.
Definition: LinnSuperBlock.h:113
LinnSuperBlock::groupsTable
le32 groupsTable
Block address of the LinnGroup table.
Definition: LinnSuperBlock.h:135
LinnSuperBlock::creationTime
le32 creationTime
Time when the filesystem was created.
Definition: LinnSuperBlock.h:130
le32
u32 BITWISE le32
Unsigned 32-bit little endian number.
Definition: Types.h:106
LinnSuperBlock::blocksCount
le32 blocksCount
Total number of data blocks.
Definition: LinnSuperBlock.h:126
LinnSuperBlock::blockSize
le32 blockSize
Size of each data block.
Definition: LinnSuperBlock.h:121
LinnSuperBlock::mountCount
le16 mountCount
Number of times we where mounted.
Definition: LinnSuperBlock.h:132
LinnSuperBlock::minorRevision
le16 minorRevision
Filesystem minor revision level.
Definition: LinnSuperBlock.h:118
LinnSuperBlock::inodesPerGroup
le32 inodesPerGroup
Number of inodes per group.
Definition: LinnSuperBlock.h:123