Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42962
b: refs/heads/master
c: feb1892
h: refs/heads/master
v: v3
  • Loading branch information
Johann Lombardi authored and Linus Torvalds committed Dec 7, 2006
1 parent b45ddf4 commit 6588999
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 97d2a80584b30b5cd32da411deca1986ef61877a
refs/heads/master: feb189274638ea357750a9e809f5a6e2223a082e
7 changes: 4 additions & 3 deletions trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,16 +1531,17 @@ int inline ext4_ext_calc_credits_for_insert(struct inode *inode,

/*
* tree can be full, so it would need to grow in depth:
* allocation + old root + new root
* we need one credit to modify old root, credits for
* new root will be added in split accounting
*/
needed += 2 + 1 + 1;
needed += 1;

/*
* Index split can happen, we would need:
* allocate intermediate indexes (bitmap + group)
* + change two blocks at each level, but root (already included)
*/
needed = (depth * 2) + (depth * 2);
needed += (depth * 2) + (depth * 2);

/* any allocation modifies superblock */
needed += 1;
Expand Down

0 comments on commit 6588999

Please sign in to comment.