ext4: cleanup block allocator
Move the code related to block allocation to a single function and add helper funtions to differient allocation for data and meta data blocks Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
7061eba75c
commit
654b4908bc
5 changed files with 84 additions and 59 deletions
|
|
@ -561,7 +561,7 @@ static int ext4_alloc_blocks(handle_t *handle, struct inode *inode,
|
|||
goto allocated;
|
||||
/* Now allocate data blocks */
|
||||
count = target;
|
||||
/* allocating blocks for indirect blocks and direct blocks */
|
||||
/* allocating blocks for data blocks */
|
||||
current_block = ext4_new_blocks(handle, inode, iblock,
|
||||
goal, &count, err);
|
||||
if (*err && (target == blks)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue