diff options
author | Alex Tomas <alex@clusterfs.com> | 2006-10-11 04:21:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 14:14:16 -0400 |
commit | a86c61812637c7dd0c57e29880cffd477b62f2e7 (patch) | |
tree | 10737307293afde2999a887cfeac32c7d7584aa7 /include/linux/ext4_jbd2.h | |
parent | c3fcc8137ce4296ad6ab94f88bd60cbe03d21527 (diff) |
[PATCH] ext3: add extent map support
On disk extents format:
/*
* this is extent on-disk structure
* it's used at the bottom of the tree
*/
struct ext3_extent {
__le32 ee_block; /* first logical block extent covers */
__le16 ee_len; /* number of blocks covered by extent */
__le16 ee_start_hi; /* high 16 bits of physical block */
__le32 ee_start; /* low 32 bigs of physical block */
};
Signed-off-by: Alex Tomas <alex@clusterfs.com>
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/ext4_jbd2.h')
-rw-r--r-- | include/linux/ext4_jbd2.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/ext4_jbd2.h b/include/linux/ext4_jbd2.h index 99d37557cbb..aa273f024ad 100644 --- a/include/linux/ext4_jbd2.h +++ b/include/linux/ext4_jbd2.h | |||
@@ -26,9 +26,14 @@ | |||
26 | * | 26 | * |
27 | * We may have to touch one inode, one bitmap buffer, up to three | 27 | * We may have to touch one inode, one bitmap buffer, up to three |
28 | * indirection blocks, the group and superblock summaries, and the data | 28 | * indirection blocks, the group and superblock summaries, and the data |
29 | * block to complete the transaction. */ | 29 | * block to complete the transaction. |
30 | * | ||
31 | * For extents-enabled fs we may have to allocate and modify upto | ||
32 | * 5 levels of tree + root which is stored in inode. */ | ||
30 | 33 | ||
31 | #define EXT4_SINGLEDATA_TRANS_BLOCKS 8U | 34 | #define EXT4_SINGLEDATA_TRANS_BLOCKS(sb) \ |
35 | (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \ | ||
36 | || test_opt(sb, EXTENTS) ? 27U : 8U) | ||
32 | 37 | ||
33 | /* Extended attribute operations touch at most two data buffers, | 38 | /* Extended attribute operations touch at most two data buffers, |
34 | * two bitmap buffers, and two group summaries, in addition to the inode | 39 | * two bitmap buffers, and two group summaries, in addition to the inode |
@@ -42,7 +47,7 @@ | |||
42 | * superblock only gets updated once, of course, so don't bother | 47 | * superblock only gets updated once, of course, so don't bother |
43 | * counting that again for the quota updates. */ | 48 | * counting that again for the quota updates. */ |
44 | 49 | ||
45 | #define EXT4_DATA_TRANS_BLOCKS(sb) (EXT4_SINGLEDATA_TRANS_BLOCKS + \ | 50 | #define EXT4_DATA_TRANS_BLOCKS(sb) (EXT4_SINGLEDATA_TRANS_BLOCKS(sb) + \ |
46 | EXT4_XATTR_TRANS_BLOCKS - 2 + \ | 51 | EXT4_XATTR_TRANS_BLOCKS - 2 + \ |
47 | 2*EXT4_QUOTA_TRANS_BLOCKS(sb)) | 52 | 2*EXT4_QUOTA_TRANS_BLOCKS(sb)) |
48 | 53 | ||
@@ -78,9 +83,9 @@ | |||
78 | /* Amount of blocks needed for quota insert/delete - we do some block writes | 83 | /* Amount of blocks needed for quota insert/delete - we do some block writes |
79 | * but inode, sb and group updates are done only once */ | 84 | * but inode, sb and group updates are done only once */ |
80 | #define EXT4_QUOTA_INIT_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_INIT_ALLOC*\ | 85 | #define EXT4_QUOTA_INIT_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_INIT_ALLOC*\ |
81 | (EXT4_SINGLEDATA_TRANS_BLOCKS-3)+3+DQUOT_INIT_REWRITE) : 0) | 86 | (EXT4_SINGLEDATA_TRANS_BLOCKS(sb)-3)+3+DQUOT_INIT_REWRITE) : 0) |
82 | #define EXT4_QUOTA_DEL_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_DEL_ALLOC*\ | 87 | #define EXT4_QUOTA_DEL_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_DEL_ALLOC*\ |
83 | (EXT4_SINGLEDATA_TRANS_BLOCKS-3)+3+DQUOT_DEL_REWRITE) : 0) | 88 | (EXT4_SINGLEDATA_TRANS_BLOCKS(sb)-3)+3+DQUOT_DEL_REWRITE) : 0) |
84 | #else | 89 | #else |
85 | #define EXT4_QUOTA_TRANS_BLOCKS(sb) 0 | 90 | #define EXT4_QUOTA_TRANS_BLOCKS(sb) 0 |
86 | #define EXT4_QUOTA_INIT_BLOCKS(sb) 0 | 91 | #define EXT4_QUOTA_INIT_BLOCKS(sb) 0 |