diff options
author | Zheng Liu <wenqing.lz@taobao.com> | 2012-11-08 21:57:32 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-11-08 21:57:32 -0500 |
commit | 51865fda28e585bdcc164474ff6438a9ccdbfada (patch) | |
tree | c4450c21bdbce0750543d8b1cd59992fb342a650 /fs/ext4/super.c | |
parent | 9a26b66175e1c221f39bbe09e2e1d0a31a14ba6d (diff) |
ext4: let ext4 maintain extent status tree
This patch lets ext4 maintain extent status tree.
Currently it only tracks delay extent status in extent status tree. When a
delay allocation is issued, the related delay extent will be inserted into
extent status tree. When a delay extent is written out or invalidated, it will
be removed from this tree.
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 6791d091fbc7..ad6cd8aeb946 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include "xattr.h" | 50 | #include "xattr.h" |
51 | #include "acl.h" | 51 | #include "acl.h" |
52 | #include "mballoc.h" | 52 | #include "mballoc.h" |
53 | #include "ext4_extents.h" | ||
53 | 54 | ||
54 | #define CREATE_TRACE_POINTS | 55 | #define CREATE_TRACE_POINTS |
55 | #include <trace/events/ext4.h> | 56 | #include <trace/events/ext4.h> |
@@ -1033,6 +1034,7 @@ void ext4_clear_inode(struct inode *inode) | |||
1033 | clear_inode(inode); | 1034 | clear_inode(inode); |
1034 | dquot_drop(inode); | 1035 | dquot_drop(inode); |
1035 | ext4_discard_preallocations(inode); | 1036 | ext4_discard_preallocations(inode); |
1037 | ext4_es_remove_extent(inode, 0, EXT_MAX_BLOCKS); | ||
1036 | if (EXT4_I(inode)->jinode) { | 1038 | if (EXT4_I(inode)->jinode) { |
1037 | jbd2_journal_release_jbd_inode(EXT4_JOURNAL(inode), | 1039 | jbd2_journal_release_jbd_inode(EXT4_JOURNAL(inode), |
1038 | EXT4_I(inode)->jinode); | 1040 | EXT4_I(inode)->jinode); |
@@ -5296,9 +5298,14 @@ static int __init ext4_init_fs(void) | |||
5296 | init_waitqueue_head(&ext4__ioend_wq[i]); | 5298 | init_waitqueue_head(&ext4__ioend_wq[i]); |
5297 | } | 5299 | } |
5298 | 5300 | ||
5299 | err = ext4_init_pageio(); | 5301 | err = ext4_init_es(); |
5300 | if (err) | 5302 | if (err) |
5301 | return err; | 5303 | return err; |
5304 | |||
5305 | err = ext4_init_pageio(); | ||
5306 | if (err) | ||
5307 | goto out7; | ||
5308 | |||
5302 | err = ext4_init_system_zone(); | 5309 | err = ext4_init_system_zone(); |
5303 | if (err) | 5310 | if (err) |
5304 | goto out6; | 5311 | goto out6; |
@@ -5348,6 +5355,9 @@ out5: | |||
5348 | ext4_exit_system_zone(); | 5355 | ext4_exit_system_zone(); |
5349 | out6: | 5356 | out6: |
5350 | ext4_exit_pageio(); | 5357 | ext4_exit_pageio(); |
5358 | out7: | ||
5359 | ext4_exit_es(); | ||
5360 | |||
5351 | return err; | 5361 | return err; |
5352 | } | 5362 | } |
5353 | 5363 | ||