Deleted Added
sdiff udiff text old ( 251562 ) new ( 251809 )
full compact
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 251809 2013-06-16 16:10:45Z pfg $
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:

--- 24 unchanged lines hidden (view full) ---

40#include <sys/types.h>
41
42/*
43 * Maximal count of links to a file
44 */
45#define EXT2_LINK_MAX 32000
46
47/*
48 * The path name on which the file system is mounted is maintained
49 * in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in
50 * the super block for this name.
51 */
52#define MAXMNTLEN 512
53
54/*
55 * Super block for an ext2fs file system.

--- 94 unchanged lines hidden (view full) ---

150 char e2fs_wasvalid; /* valid at mount time */
151 off_t e2fs_maxfilesize;
152 struct ext2_gd *e2fs_gd; /* Group Descriptors */
153 int32_t e2fs_contigsumsize; /* size of cluster summary array */
154 int32_t *e2fs_maxcluster; /* max cluster in each cyl group */
155 struct csum *e2fs_clustersum; /* cluster summary in each cyl group */
156};
157
158/* cluster summary information */
159
160struct csum {
161 int8_t cs_init; /* cluster summary has been initialized */
162 int32_t *cs_sum; /* cluster summary array */
163};
164
165/*
166 * The second extended file system magic number
167 */
168#define E2FS_MAGIC 0xEF53
169
170/*
171 * Revision levels
172 */
173#define E2FS_REV0 0 /* The good old (original) format */
174#define E2FS_REV1 1 /* V2 format w/ dynamic inode sizes */
175
176#define E2FS_REV0_INODE_SIZE 128
177
178/*
179 * compatible/incompatible features
180 */
181#define EXT2F_COMPAT_PREALLOC 0x0001
182#define EXT2F_COMPAT_HASJOURNAL 0x0004
183#define EXT2F_COMPAT_RESIZE 0x0010

--- 40 unchanged lines hidden (view full) ---

224#define EXT2_HAS_COMPAT_FEATURE(sb,mask) \
225 ( EXT2_SB(sb)->e2fs->e2fs_features_compat & htole32(mask) )
226#define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) \
227 ( EXT2_SB(sb)->e2fs->e2fs_features_rocompat & htole32(mask) )
228#define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) \
229 ( EXT2_SB(sb)->e2fs->e2fs_features_incompat & htole32(mask) )
230
231/*
232 * File clean flags
233 */
234#define E2FS_ISCLEAN 0x0001 /* Unmounted cleanly */
235#define E2FS_ERRORS 0x0002 /* Errors detected */
236
237/* ext2 file system block group descriptor */
238
239struct ext2_gd {

--- 6 unchanged lines hidden (view full) ---

246 uint16_t ext2bgd_flags; /* block group flags */
247 uint32_t ext2bgd_x_bitmap; /* snapshot exclusion bitmap loc. */
248 uint16_t ext2bgd_b_bmap_csum; /* block bitmap checksum */
249 uint16_t ext2bgd_i_bmap_csum; /* inode bitmap checksum */
250 uint16_t ext2bgd_i_unused; /* unused inode count */
251 uint16_t ext2bgd_csum; /* group descriptor checksum */
252};
253
254
255/* EXT2FS metadatas are stored in little-endian byte order. These macros
256 * helps reading these metadatas
257 */
258
259#define e2fs_cgload(old, new, size) memcpy((new), (old), (size));
260#define e2fs_cgsave(old, new, size) memcpy((new), (old), (size));
261
262/*

--- 23 unchanged lines hidden ---