ext2fs.h (217585) | ext2fs.h (217703) |
---|---|
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 * | 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 * $FreeBSD: head/sys/fs/ext2fs/ext2fs.h 217585 2011-01-19 16:55:32Z jhb $ | 7 * $FreeBSD: head/sys/fs/ext2fs/ext2fs.h 217703 2011-01-21 22:00:40Z jhb $ |
8 */ 9/*- 10 * Copyright (c) 2009 Aditya Sarawgi 11 * All rights reserved. 12 * 13 * Redistribution and use in source and binary forms, with or without 14 * modification, are permitted provided that the following conditions 15 * are met: --- 18 unchanged lines hidden (view full) --- 34 * 35 */ 36 37#ifndef _FS_EXT2FS_EXT2_FS_H 38#define _FS_EXT2FS_EXT2_FS_H 39 40#include <sys/types.h> 41 | 8 */ 9/*- 10 * Copyright (c) 2009 Aditya Sarawgi 11 * All rights reserved. 12 * 13 * Redistribution and use in source and binary forms, with or without 14 * modification, are permitted provided that the following conditions 15 * are met: --- 18 unchanged lines hidden (view full) --- 34 * 35 */ 36 37#ifndef _FS_EXT2FS_EXT2_FS_H 38#define _FS_EXT2FS_EXT2_FS_H 39 40#include <sys/types.h> 41 |
42/* 43 * Special inode numbers 44 */ 45#define EXT2_BAD_INO 1 /* Bad blocks inode */ 46#define EXT2_ROOT_INO 2 /* Root inode */ 47#define EXT2_BOOT_LOADER_INO 5 /* Boot loader inode */ 48#define EXT2_UNDEL_DIR_INO 6 /* Undelete directory inode */ 49 50/* First non-reserved inode for old ext2 filesystems */ 51#define E2FS_REV0_FIRST_INO 11 52 53/* 54 * The second extended file system magic number 55 */ 56#define E2FS_MAGIC 0xEF53 57 | |
58#if defined(_KERNEL) 59/* 60 * FreeBSD passes the pointer to the in-core struct with relevant 61 * fields to EXT2_SB macro when accessing superblock fields. 62 */ 63#define EXT2_SB(sb) (sb) 64#else 65/* Assume that user mode programs are passing in an ext2fs superblock, not --- 99 unchanged lines hidden (view full) --- 165 uint32_t e2fs_descpb; /* Number of group descriptors per block */ 166 uint32_t e2fs_gdbcount; /* Number of group descriptors */ 167 uint32_t e2fs_gcount; /* Number of groups */ 168 uint32_t e2fs_first_inode;/* First inode on fs */ 169 int32_t e2fs_isize; /* Size of inode */ 170 uint32_t e2fs_mount_opt; 171 uint32_t e2fs_blocksize_bits; 172 uint32_t e2fs_total_dir; /* Total number of directories */ | 42#if defined(_KERNEL) 43/* 44 * FreeBSD passes the pointer to the in-core struct with relevant 45 * fields to EXT2_SB macro when accessing superblock fields. 46 */ 47#define EXT2_SB(sb) (sb) 48#else 49/* Assume that user mode programs are passing in an ext2fs superblock, not --- 99 unchanged lines hidden (view full) --- 149 uint32_t e2fs_descpb; /* Number of group descriptors per block */ 150 uint32_t e2fs_gdbcount; /* Number of group descriptors */ 151 uint32_t e2fs_gcount; /* Number of groups */ 152 uint32_t e2fs_first_inode;/* First inode on fs */ 153 int32_t e2fs_isize; /* Size of inode */ 154 uint32_t e2fs_mount_opt; 155 uint32_t e2fs_blocksize_bits; 156 uint32_t e2fs_total_dir; /* Total number of directories */ |
173 uint8_t *e2fs_contigdirs; | 157 uint8_t *e2fs_contigdirs; /* (u) # of contig. allocated dirs */ |
174 char e2fs_wasvalid; /* valid at mount time */ 175 off_t e2fs_maxfilesize; 176 struct ext2_gd *e2fs_gd; /* Group Descriptors */ 177}; 178 179/* 180 * The second extended file system version 181 */ 182#define E2FS_DATE "95/08/09" 183#define E2FS_VERSION "0.5b" 184 | 158 char e2fs_wasvalid; /* valid at mount time */ 159 off_t e2fs_maxfilesize; 160 struct ext2_gd *e2fs_gd; /* Group Descriptors */ 161}; 162 163/* 164 * The second extended file system version 165 */ 166#define E2FS_DATE "95/08/09" 167#define E2FS_VERSION "0.5b" 168 |
169/* First non-reserved inode for old ext2 filesystems */ 170#define E2FS_REV0_FIRST_INO 11 171 |
|
185/* | 172/* |
173 * The second extended file system magic number 174 */ 175#define E2FS_MAGIC 0xEF53 176 177/* |
|
186 * Revision levels 187 */ 188#define E2FS_REV0 0 /* The good old (original) format */ 189#define E2FS_REV1 1 /* V2 format w/ dynamic inode sizes */ 190 191#define E2FS_CURRENT_REV E2FS_REV0 192#define E2FS_MAX_SUPP_REV E2FS_REV1 193 194#define E2FS_REV0_INODE_SIZE 128 195 196/* 197 * compatible/incompatible features 198 */ 199#define EXT2F_COMPAT_PREALLOC 0x0001 | 178 * Revision levels 179 */ 180#define E2FS_REV0 0 /* The good old (original) format */ 181#define E2FS_REV1 1 /* V2 format w/ dynamic inode sizes */ 182 183#define E2FS_CURRENT_REV E2FS_REV0 184#define E2FS_MAX_SUPP_REV E2FS_REV1 185 186#define E2FS_REV0_INODE_SIZE 128 187 188/* 189 * compatible/incompatible features 190 */ 191#define EXT2F_COMPAT_PREALLOC 0x0001 |
192#define EXT2F_COMPAT_HASJOURNAL 0x0004 |
|
200#define EXT2F_COMPAT_RESIZE 0x0010 201 202#define EXT2F_ROCOMPAT_SPARSESUPER 0x0001 203#define EXT2F_ROCOMPAT_LARGEFILE 0x0002 204#define EXT2F_ROCOMPAT_BTREE_DIR 0x0004 205 206#define EXT2F_INCOMPAT_COMP 0x0001 207#define EXT2F_INCOMPAT_FTYPE 0x0002 --- 122 unchanged lines hidden --- | 193#define EXT2F_COMPAT_RESIZE 0x0010 194 195#define EXT2F_ROCOMPAT_SPARSESUPER 0x0001 196#define EXT2F_ROCOMPAT_LARGEFILE 0x0002 197#define EXT2F_ROCOMPAT_BTREE_DIR 0x0004 198 199#define EXT2F_INCOMPAT_COMP 0x0001 200#define EXT2F_INCOMPAT_FTYPE 0x0002 --- 122 unchanged lines hidden --- |