Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107540
b: refs/heads/master
c: 34071da
h: refs/heads/master
v: v3
  • Loading branch information
Theodore Ts'o committed Aug 2, 2008
1 parent 0d9801a commit fcc1862
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc965ab3f2b4b7bb898b11d61d25295c2053b8ac
refs/heads/master: 34071da71a665d8c81e3b3467c9a2e7c56386fec
10 changes: 7 additions & 3 deletions trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -1910,9 +1910,13 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,
BUG_ON(b != ex_ee_block + ex_ee_len - 1);
}

/* at present, extent can't cross block group: */
/* leaf + bitmap + group desc + sb + inode */
credits = 5;
/*
* 3 for leaf, sb, and inode plus 2 (bmap and group
* descriptor) for each block group; assume two block
* groups plus ex_ee_len/blocks_per_block_group for
* the worst case
*/
credits = 7 + 2*(ex_ee_len/EXT4_BLOCKS_PER_GROUP(inode->i_sb));
if (ex == EXT_FIRST_EXTENT(eh)) {
correct_index = 1;
credits += (ext_depth(inode)) + 1;
Expand Down

0 comments on commit fcc1862

Please sign in to comment.