aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext3/inode.c')
-rw-r--r--fs/ext3/inode.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index ad05353040a1..a9580617edd2 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -498,7 +498,7 @@ static ext3_fsblk_t ext3_find_goal(struct inode *inode, long block,
498} 498}
499 499
500/** 500/**
501 * ext3_blks_to_allocate: Look up the block map and count the number 501 * ext3_blks_to_allocate - Look up the block map and count the number
502 * of direct blocks need to be allocated for the given branch. 502 * of direct blocks need to be allocated for the given branch.
503 * 503 *
504 * @branch: chain of indirect blocks 504 * @branch: chain of indirect blocks
@@ -536,14 +536,18 @@ static int ext3_blks_to_allocate(Indirect *branch, int k, unsigned long blks,
536} 536}
537 537
538/** 538/**
539 * ext3_alloc_blocks: multiple allocate blocks needed for a branch 539 * ext3_alloc_blocks - multiple allocate blocks needed for a branch
540 * @handle: handle for this transaction
541 * @inode: owner
542 * @goal: preferred place for allocation
540 * @indirect_blks: the number of blocks need to allocate for indirect 543 * @indirect_blks: the number of blocks need to allocate for indirect
541 * blocks 544 * blocks
542 * 545 * @blks: number of blocks need to allocated for direct blocks
543 * @new_blocks: on return it will store the new block numbers for 546 * @new_blocks: on return it will store the new block numbers for
544 * the indirect blocks(if needed) and the first direct block, 547 * the indirect blocks(if needed) and the first direct block,
545 * @blks: on return it will store the total number of allocated 548 * @err: here we store the error value
546 * direct blocks 549 *
550 * return the number of direct blocks allocated
547 */ 551 */
548static int ext3_alloc_blocks(handle_t *handle, struct inode *inode, 552static int ext3_alloc_blocks(handle_t *handle, struct inode *inode,
549 ext3_fsblk_t goal, int indirect_blks, int blks, 553 ext3_fsblk_t goal, int indirect_blks, int blks,
@@ -598,9 +602,11 @@ failed_out:
598 602
599/** 603/**
600 * ext3_alloc_branch - allocate and set up a chain of blocks. 604 * ext3_alloc_branch - allocate and set up a chain of blocks.
605 * @handle: handle for this transaction
601 * @inode: owner 606 * @inode: owner
602 * @indirect_blks: number of allocated indirect blocks 607 * @indirect_blks: number of allocated indirect blocks
603 * @blks: number of allocated direct blocks 608 * @blks: number of allocated direct blocks
609 * @goal: preferred place for allocation
604 * @offsets: offsets (in the blocks) to store the pointers to next. 610 * @offsets: offsets (in the blocks) to store the pointers to next.
605 * @branch: place to store the chain in. 611 * @branch: place to store the chain in.
606 * 612 *
@@ -700,10 +706,9 @@ failed:
700 706
701/** 707/**
702 * ext3_splice_branch - splice the allocated branch onto inode. 708 * ext3_splice_branch - splice the allocated branch onto inode.
709 * @handle: handle for this transaction
703 * @inode: owner 710 * @inode: owner
704 * @block: (logical) number of block we are adding 711 * @block: (logical) number of block we are adding
705 * @chain: chain of indirect blocks (with a missing link - see
706 * ext3_alloc_branch)
707 * @where: location of missing link 712 * @where: location of missing link
708 * @num: number of indirect blocks we are adding 713 * @num: number of indirect blocks we are adding
709 * @blks: number of direct blocks we are adding 714 * @blks: number of direct blocks we are adding
@@ -2530,7 +2535,6 @@ void ext3_truncate(struct inode *inode)
2530 */ 2535 */
2531 } else { 2536 } else {
2532 /* Shared branch grows from an indirect block */ 2537 /* Shared branch grows from an indirect block */
2533 BUFFER_TRACE(partial->bh, "get_write_access");
2534 ext3_free_branches(handle, inode, partial->bh, 2538 ext3_free_branches(handle, inode, partial->bh,
2535 partial->p, 2539 partial->p,
2536 partial->p+1, (chain+n-1) - partial); 2540 partial->p+1, (chain+n-1) - partial);