|
Line 0
Link Here
|
|
|
1 |
/* |
| 2 |
* gm_reiserfs.h -- gpart ReiserFS guessing module header |
| 3 |
* |
| 4 |
* gpart (c) 1999-2001 Michail Brzitwa <mb@ichabod.han.de> |
| 5 |
* Guess PC-type hard disk partitions. |
| 6 |
* |
| 7 |
* gpart is free software; you can redistribute it and/or modify |
| 8 |
* it under the terms of the GNU General Public License as published |
| 9 |
* by the Free Software Foundation; either version 2, or (at your |
| 10 |
* option) any later version. |
| 11 |
* |
| 12 |
* Created: 21.01.1999 <mb@ichabod.han.de> |
| 13 |
* Modified: 26.12.2000 Francis Devereux <francis@devereux.tc> |
| 14 |
* Update support reiserfs version 3.5.28 |
| 15 |
* Modified: 10.01.2003 Yury Umanets <umka@namesys.com> |
| 16 |
* Added reiserfs 3.6.x support. |
| 17 |
* |
| 18 |
*/ |
| 19 |
|
| 20 |
#ifndef _GM_reiserfs_H |
| 21 |
#define _GM_reiserfs_H |
| 22 |
|
| 23 |
/* imported from asm/types.h */ |
| 24 |
typedef __signed__ char __s8; |
| 25 |
typedef unsigned char __u8; |
| 26 |
|
| 27 |
typedef __signed__ short __s16; |
| 28 |
typedef unsigned short __u16; |
| 29 |
|
| 30 |
typedef __signed__ int __s32; |
| 31 |
typedef unsigned int __u32; |
| 32 |
|
| 33 |
/* |
| 34 |
* taken from ReiserFS v3.5.28, v3.6.x. Reiserfs Copyright 1996-2000 Hans Reiser |
| 35 |
*/ |
| 36 |
|
| 37 |
#define REISERFS_SUPER_V35_MAGIC "ReIsErFs" |
| 38 |
#define REISERFS_SUPER_V36_MAGIC "ReIsEr2Fs" |
| 39 |
|
| 40 |
#define REISERFS_FIRST_BLOCK 64 |
| 41 |
#define REISERFS_VALID_FS 1 |
| 42 |
#define REISERFS_ERROR_FS 2 |
| 43 |
#define REISERFS_MIN_BLOCK_AMOUNT 100 |
| 44 |
|
| 45 |
struct reiserfs_super_block_v35 |
| 46 |
{ |
| 47 |
__u32 s_block_count; /* blocks count */ |
| 48 |
__u32 s_free_blocks; /* free blocks count */ |
| 49 |
__u32 s_root_block; /* root block number */ |
| 50 |
__u32 s_journal_block; /* journal block number */ |
| 51 |
__u32 s_journal_dev; /* journal device number */ |
| 52 |
__u32 s_orig_journal_size; /* size of the journal on FS creation. used to make sure they don't overflow it */ |
| 53 |
__u32 s_journal_trans_max; /* max number of blocks in a transaction. */ |
| 54 |
__u32 s_journal_block_count; /* total size of the journal. can change over time */ |
| 55 |
__u32 s_journal_max_batch; /* max number of blocks to batch into a trans */ |
| 56 |
__u32 s_journal_max_commit_age; /* in seconds, how old can an async commit be */ |
| 57 |
__u32 s_journal_max_trans_age; /* in seconds, how old can a transaction be */ |
| 58 |
__u16 s_blocksize; /* block size */ |
| 59 |
__u16 s_oid_maxsize; /* max size of object id array, see get_objectid() commentary */ |
| 60 |
__u16 s_oid_cursize; /* current size of object id array */ |
| 61 |
__u16 s_state; /* valid or error */ |
| 62 |
char s_magic[12]; /* reiserfs magic string indicates that file system is reiserfs */ |
| 63 |
__u32 s_hash_function_code; /* indicate, what hash fuction is being use to sort names in a directory*/ |
| 64 |
__u16 s_tree_height; /* height of disk tree */ |
| 65 |
__u16 s_bmap_nr; /* amount of bitmap blocks needed to address each block of file system */ |
| 66 |
__u16 s_reserved; |
| 67 |
}; |
| 68 |
|
| 69 |
#define SB_V35_SIZE (sizeof(struct reiserfs_super_block_v35)) |
| 70 |
|
| 71 |
struct reiserfs_super_block_v36 { |
| 72 |
struct reiserfs_super_block_v35 s_v35; |
| 73 |
__u32 s_inode_generation; |
| 74 |
__u32 s_flags; |
| 75 |
char s_uuid[16]; |
| 76 |
char s_label[16]; |
| 77 |
char s_unused[88]; |
| 78 |
}; |
| 79 |
|
| 80 |
#define SB_V36_SIZE (sizeof(struct reiserfs_super_block_v36)) |
| 81 |
|
| 82 |
#endif /* _GM_REISERFS_H */ |