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
138
144#endif /* __FILESYSTEM_LINNSUPERBLOCK_H */
u16 BITWISE le16
Unsigned 16-bit little endian number.
Definition Types.h:112
u32 BITWISE le32
Unsigned 32-bit little endian number.
Definition Types.h:106
Linnenbank Filesystem (LinnFS) super block.
le16 mountCount
Number of times we where mounted.
le32 creationTime
Time when the filesystem was created.
le32 groupsTable
Block address of the LinnGroup table.
le32 inodesCount
Total number of inodes.
le32 magic0
Allows detection of valid superblocks.
le32 freeInodesCount
Free inodes remaining.
le32 blockSize
Size of each data block.
le32 mountTime
Last time we where mounted (seconds since 1970).
le32 magic1
Allows detection of valid superblocks.
le16 minorRevision
Filesystem minor revision level.
le16 majorRevision
Filesystem major revision level.
le32 inodesPerGroup
Number of inodes per group.
le32 lastCheck
Timestamp of the last check.
le32 blocksCount
Total number of data blocks.
le32 freeBlocksCount
Number of free data blocks.
le32 blocksPerGroup
Number of blocks per group.
le16 state
Describes the current status.