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 /fs/ext4/ialloc.c | |
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 'fs/ext4/ialloc.c')
-rw-r--r-- | fs/ext4/ialloc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 34d39ae966f7..e17a6c918d72 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
@@ -615,6 +615,17 @@ got: | |||
615 | ext4_std_error(sb, err); | 615 | ext4_std_error(sb, err); |
616 | goto fail_free_drop; | 616 | goto fail_free_drop; |
617 | } | 617 | } |
618 | if (test_opt(sb, EXTENTS)) { | ||
619 | EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL; | ||
620 | ext4_ext_tree_init(handle, inode); | ||
621 | if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) { | ||
622 | err = ext4_journal_get_write_access(handle, EXT4_SB(sb)->s_sbh); | ||
623 | if (err) goto fail; | ||
624 | EXT4_SET_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS); | ||
625 | BUFFER_TRACE(EXT4_SB(sb)->s_sbh, "call ext4_journal_dirty_metadata"); | ||
626 | err = ext4_journal_dirty_metadata(handle, EXT4_SB(sb)->s_sbh); | ||
627 | } | ||
628 | } | ||
618 | 629 | ||
619 | ext4_debug("allocating inode %lu\n", inode->i_ino); | 630 | ext4_debug("allocating inode %lu\n", inode->i_ino); |
620 | goto really_out; | 631 | goto really_out; |