aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index e659597b690b..db3cc913ee8f 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -552,7 +552,7 @@ static ext4_fsblk_t ext4_find_goal(struct inode *inode, ext4_lblk_t block,
552} 552}
553 553
554/** 554/**
555 * ext4_blks_to_allocate: Look up the block map and count the number 555 * ext4_blks_to_allocate - Look up the block map and count the number
556 * of direct blocks need to be allocated for the given branch. 556 * of direct blocks need to be allocated for the given branch.
557 * 557 *
558 * @branch: chain of indirect blocks 558 * @branch: chain of indirect blocks
@@ -591,13 +591,19 @@ static int ext4_blks_to_allocate(Indirect *branch, int k, unsigned int blks,
591 591
592/** 592/**
593 * ext4_alloc_blocks: multiple allocate blocks needed for a branch 593 * ext4_alloc_blocks: multiple allocate blocks needed for a branch
594 * @handle: handle for this transaction
595 * @inode: inode which needs allocated blocks
596 * @iblock: the logical block to start allocated at
597 * @goal: preferred physical block of allocation
594 * @indirect_blks: the number of blocks need to allocate for indirect 598 * @indirect_blks: the number of blocks need to allocate for indirect
595 * blocks 599 * blocks
596 * 600 * @blks: number of desired blocks
597 * @new_blocks: on return it will store the new block numbers for 601 * @new_blocks: on return it will store the new block numbers for
598 * the indirect blocks(if needed) and the first direct block, 602 * the indirect blocks(if needed) and the first direct block,
599 * @blks: on return it will store the total number of allocated 603 * @err: on return it will store the error code
600 * direct blocks 604 *
605 * This function will return the number of blocks allocated as
606 * requested by the passed-in parameters.
601 */ 607 */
602static int ext4_alloc_blocks(handle_t *handle, struct inode *inode, 608static int ext4_alloc_blocks(handle_t *handle, struct inode *inode,
603 ext4_lblk_t iblock, ext4_fsblk_t goal, 609 ext4_lblk_t iblock, ext4_fsblk_t goal,
@@ -711,9 +717,11 @@ failed_out:
711 717
712/** 718/**
713 * ext4_alloc_branch - allocate and set up a chain of blocks. 719 * ext4_alloc_branch - allocate and set up a chain of blocks.
720 * @handle: handle for this transaction
714 * @inode: owner 721 * @inode: owner
715 * @indirect_blks: number of allocated indirect blocks 722 * @indirect_blks: number of allocated indirect blocks
716 * @blks: number of allocated direct blocks 723 * @blks: number of allocated direct blocks
724 * @goal: preferred place for allocation
717 * @offsets: offsets (in the blocks) to store the pointers to next. 725 * @offsets: offsets (in the blocks) to store the pointers to next.
718 * @branch: place to store the chain in. 726 * @branch: place to store the chain in.
719 * 727 *
@@ -826,6 +834,7 @@ failed:
826 834
827/** 835/**
828 * ext4_splice_branch - splice the allocated branch onto inode. 836 * ext4_splice_branch - splice the allocated branch onto inode.
837 * @handle: handle for this transaction
829 * @inode: owner 838 * @inode: owner
830 * @block: (logical) number of block we are adding 839 * @block: (logical) number of block we are adding
831 * @chain: chain of indirect blocks (with a missing link - see 840 * @chain: chain of indirect blocks (with a missing link - see