libparted 3.6
Loading...
Searching...
No Matches
f2fs.h
Go to the documentation of this file.
1/*
2 libparted/fs/f2fs - Flash-Friendly File System
3 Copyright (C) 2020-2023 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef _F2FS_H
19#define _F2FS_H
21#define F2FS_MAGIC 0xF2F52010
22#define F2FS_MAX_VOLUME_NAME 512
23#define F2FS_SB_OFFSET 0x02
26 uint32_t magic; /* Magic Number */
27 uint16_t major_ver; /* Major Version */
28 uint16_t minor_ver; /* Minor Version */
29 uint32_t log_sectorsize; /* log2 sector size in bytes */
30 uint32_t log_sectors_per_block; /* log2 # of sectors per block */
31 uint32_t log_blocksize; /* log2 block size in bytes */
32 uint32_t log_blocks_per_seg; /* log2 # of blocks per segment */
33 uint32_t segs_per_sec; /* # of segments per section */
34 uint32_t secs_per_zone; /* # of sections per zone */
35 uint32_t checksum_offset; /* checksum offset inside super block */
36 uint64_t block_count; /* total # of user blocks */
37 uint32_t section_count; /* total # of sections */
38 uint32_t segment_count; /* total # of segments */
39 uint32_t segment_count_ckpt; /* # of segments for checkpoint */
40 uint32_t segment_count_sit; /* # of segments for SIT */
41 uint32_t segment_count_nat; /* # of segments for NAT */
42 uint32_t segment_count_ssa; /* # of segments for SSA */
43 uint32_t segment_count_main; /* # of segments for main area */
44 uint32_t segment0_blkaddr; /* start block address of segment 0 */
45 uint32_t cp_blkaddr; /* start block address of checkpoint */
46 uint32_t sit_blkaddr; /* start block address of SIT */
47 uint32_t nat_blkaddr; /* start block address of NAT */
48 uint32_t ssa_blkaddr; /* start block address of SSA */
49 uint32_t main_blkaddr; /* start block address of main area */
50 uint32_t root_ino; /* root inode number */
51 uint32_t node_ino; /* node inode number */
52 uint32_t meta_ino; /* meta inode number */
53 uint8_t uuid[16]; /* 128-bit uuid for volume */
54 uint16_t volume_name[F2FS_MAX_VOLUME_NAME]; /* volume name */
55} __attribute__((packed));
56
57#endif
typedef __attribute__
Definition: vtoc.h:80
#define F2FS_MAX_VOLUME_NAME
Definition: f2fs.h:22
Definition: f2fs.h:25
uint32_t root_ino
Definition: f2fs.h:50
uint32_t segment_count_sit
Definition: f2fs.h:40
uint32_t segment_count_ckpt
Definition: f2fs.h:39
uint32_t nat_blkaddr
Definition: f2fs.h:47
uint64_t block_count
Definition: f2fs.h:36
uint32_t segment_count_nat
Definition: f2fs.h:41
uint16_t volume_name[F2FS_MAX_VOLUME_NAME]
Definition: f2fs.h:54
uint32_t cp_blkaddr
Definition: f2fs.h:45
uint32_t secs_per_zone
Definition: f2fs.h:34
uint32_t node_ino
Definition: f2fs.h:51
uint16_t minor_ver
Definition: f2fs.h:28
uint32_t section_count
Definition: f2fs.h:37
uint32_t log_blocksize
Definition: f2fs.h:31
uint32_t sit_blkaddr
Definition: f2fs.h:46
uint32_t log_sectorsize
Definition: f2fs.h:29
uint32_t segment_count_main
Definition: f2fs.h:43
uint32_t log_blocks_per_seg
Definition: f2fs.h:32
uint32_t ssa_blkaddr
Definition: f2fs.h:48
uint8_t uuid[16]
Definition: f2fs.h:53
uint32_t segs_per_sec
Definition: f2fs.h:33
uint32_t checksum_offset
Definition: f2fs.h:35
uint32_t segment_count
Definition: f2fs.h:38
uint32_t segment_count_ssa
Definition: f2fs.h:42
uint16_t major_ver
Definition: f2fs.h:27
uint32_t log_sectors_per_block
Definition: f2fs.h:30
uint32_t meta_ino
Definition: f2fs.h:52
uint32_t magic
Definition: f2fs.h:26
uint32_t segment0_blkaddr
Definition: f2fs.h:44
uint32_t main_blkaddr
Definition: f2fs.h:49