diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-07 16:03:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-07 16:03:53 -0400 |
commit | 09dc942c2a767e2d298f1cc9294bc19c7d7208c5 (patch) | |
tree | d310c118467c90c264e953bdc320ae08394c662a /fs/ext4/extents.c | |
parent | 90e0c225968f0878e090c7ff3f88323973476cee (diff) | |
parent | 6c7a120ac6c62316ab1fc78dfc0a7b13f3bfcbff (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (40 commits)
ext4: Adding error check after calling ext4_mb_regular_allocator()
ext4: Fix dirtying of journalled buffers in data=journal mode
ext4: re-inline ext4_rec_len_(to|from)_disk functions
jbd2: Remove t_handle_lock from start_this_handle()
jbd2: Change j_state_lock to be a rwlock_t
jbd2: Use atomic variables to avoid taking t_handle_lock in jbd2_journal_stop
ext4: Add mount options in superblock
ext4: force block allocation on quota_off
ext4: fix freeze deadlock under IO
ext4: drop inode from orphan list if ext4_delete_inode() fails
ext4: check to make make sure bd_dev is set before dereferencing it
jbd2: Make barrier messages less scary
ext4: don't print scary messages for allocation failures post-abort
ext4: fix EFBIG edge case when writing to large non-extent file
ext4: fix ext4_get_blocks references
ext4: Always journal quota file modifications
ext4: Fix potential memory leak in ext4_fill_super
ext4: Don't error out the fs if the user tries to make a file too big
ext4: allocate stripe-multiple IOs on stripe boundaries
ext4: move aio completion after unwritten extent conversion
...
Fix up conflicts in fs/ext4/inode.c as per Ted.
Fix up xfs conflicts as per earlier xfs merge.
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index bf029c7d5518..06328d3e5717 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -401,9 +401,9 @@ static int ext4_valid_extent_entries(struct inode *inode, | |||
401 | return 1; | 401 | return 1; |
402 | } | 402 | } |
403 | 403 | ||
404 | static int __ext4_ext_check(const char *function, struct inode *inode, | 404 | static int __ext4_ext_check(const char *function, unsigned int line, |
405 | struct ext4_extent_header *eh, | 405 | struct inode *inode, struct ext4_extent_header *eh, |
406 | int depth) | 406 | int depth) |
407 | { | 407 | { |
408 | const char *error_msg; | 408 | const char *error_msg; |
409 | int max = 0; | 409 | int max = 0; |
@@ -436,7 +436,7 @@ static int __ext4_ext_check(const char *function, struct inode *inode, | |||
436 | return 0; | 436 | return 0; |
437 | 437 | ||
438 | corrupted: | 438 | corrupted: |
439 | ext4_error_inode(function, inode, | 439 | ext4_error_inode(inode, function, line, 0, |
440 | "bad header/extent: %s - magic %x, " | 440 | "bad header/extent: %s - magic %x, " |
441 | "entries %u, max %u(%u), depth %u(%u)", | 441 | "entries %u, max %u(%u), depth %u(%u)", |
442 | error_msg, le16_to_cpu(eh->eh_magic), | 442 | error_msg, le16_to_cpu(eh->eh_magic), |
@@ -447,7 +447,7 @@ corrupted: | |||
447 | } | 447 | } |
448 | 448 | ||
449 | #define ext4_ext_check(inode, eh, depth) \ | 449 | #define ext4_ext_check(inode, eh, depth) \ |
450 | __ext4_ext_check(__func__, inode, eh, depth) | 450 | __ext4_ext_check(__func__, __LINE__, inode, eh, depth) |
451 | 451 | ||
452 | int ext4_ext_check_inode(struct inode *inode) | 452 | int ext4_ext_check_inode(struct inode *inode) |
453 | { | 453 | { |
@@ -1083,7 +1083,6 @@ static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, | |||
1083 | { | 1083 | { |
1084 | struct ext4_ext_path *curp = path; | 1084 | struct ext4_ext_path *curp = path; |
1085 | struct ext4_extent_header *neh; | 1085 | struct ext4_extent_header *neh; |
1086 | struct ext4_extent_idx *fidx; | ||
1087 | struct buffer_head *bh; | 1086 | struct buffer_head *bh; |
1088 | ext4_fsblk_t newblock; | 1087 | ext4_fsblk_t newblock; |
1089 | int err = 0; | 1088 | int err = 0; |
@@ -1144,10 +1143,10 @@ static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, | |||
1144 | ext4_idx_store_pblock(curp->p_idx, newblock); | 1143 | ext4_idx_store_pblock(curp->p_idx, newblock); |
1145 | 1144 | ||
1146 | neh = ext_inode_hdr(inode); | 1145 | neh = ext_inode_hdr(inode); |
1147 | fidx = EXT_FIRST_INDEX(neh); | ||
1148 | ext_debug("new root: num %d(%d), lblock %d, ptr %llu\n", | 1146 | ext_debug("new root: num %d(%d), lblock %d, ptr %llu\n", |
1149 | le16_to_cpu(neh->eh_entries), le16_to_cpu(neh->eh_max), | 1147 | le16_to_cpu(neh->eh_entries), le16_to_cpu(neh->eh_max), |
1150 | le32_to_cpu(fidx->ei_block), idx_pblock(fidx)); | 1148 | le32_to_cpu(EXT_FIRST_INDEX(neh)->ei_block), |
1149 | idx_pblock(EXT_FIRST_INDEX(neh))); | ||
1151 | 1150 | ||
1152 | neh->eh_depth = cpu_to_le16(path->p_depth + 1); | 1151 | neh->eh_depth = cpu_to_le16(path->p_depth + 1); |
1153 | err = ext4_ext_dirty(handle, inode, curp); | 1152 | err = ext4_ext_dirty(handle, inode, curp); |
@@ -2954,7 +2953,6 @@ static int ext4_split_unwritten_extents(handle_t *handle, | |||
2954 | struct ext4_extent *ex1 = NULL; | 2953 | struct ext4_extent *ex1 = NULL; |
2955 | struct ext4_extent *ex2 = NULL; | 2954 | struct ext4_extent *ex2 = NULL; |
2956 | struct ext4_extent *ex3 = NULL; | 2955 | struct ext4_extent *ex3 = NULL; |
2957 | struct ext4_extent_header *eh; | ||
2958 | ext4_lblk_t ee_block, eof_block; | 2956 | ext4_lblk_t ee_block, eof_block; |
2959 | unsigned int allocated, ee_len, depth; | 2957 | unsigned int allocated, ee_len, depth; |
2960 | ext4_fsblk_t newblock; | 2958 | ext4_fsblk_t newblock; |
@@ -2971,7 +2969,6 @@ static int ext4_split_unwritten_extents(handle_t *handle, | |||
2971 | eof_block = map->m_lblk + map->m_len; | 2969 | eof_block = map->m_lblk + map->m_len; |
2972 | 2970 | ||
2973 | depth = ext_depth(inode); | 2971 | depth = ext_depth(inode); |
2974 | eh = path[depth].p_hdr; | ||
2975 | ex = path[depth].p_ext; | 2972 | ex = path[depth].p_ext; |
2976 | ee_block = le32_to_cpu(ex->ee_block); | 2973 | ee_block = le32_to_cpu(ex->ee_block); |
2977 | ee_len = ext4_ext_get_actual_len(ex); | 2974 | ee_len = ext4_ext_get_actual_len(ex); |
@@ -3058,7 +3055,6 @@ static int ext4_split_unwritten_extents(handle_t *handle, | |||
3058 | err = PTR_ERR(path); | 3055 | err = PTR_ERR(path); |
3059 | goto out; | 3056 | goto out; |
3060 | } | 3057 | } |
3061 | eh = path[depth].p_hdr; | ||
3062 | ex = path[depth].p_ext; | 3058 | ex = path[depth].p_ext; |
3063 | if (ex2 != &newex) | 3059 | if (ex2 != &newex) |
3064 | ex2 = ex; | 3060 | ex2 = ex; |