Lines Matching full:indirect

3  *  linux/fs/ext4/indirect.c
35 } Indirect; typedef
37 static inline void add_chain(Indirect *p, struct buffer_head *bh, __le32 *v) in add_chain()
49 * followed (on disk) by an indirect block.
53 * data blocks at leaves and indirect blocks in intermediate nodes.
60 * we need to know is the capacity of indirect blocks (taken from the
66 * indirect block) is spelled differently, because otherwise on an
115 * ext4_get_branch - read the chain of indirect blocks leading to data
118 * @offsets: offsets of pointers in inode/indirect blocks
128 * for i>0) and chain[i].bh points to the buffer_head of i-th indirect
136 * or when it gets an IO error reading an indirect block
138 * or when it reads all @depth-1 indirect blocks successfully and finds
144 static Indirect *ext4_get_branch(struct inode *inode, int depth, in ext4_get_branch()
146 Indirect chain[4], int *err) in ext4_get_branch()
149 Indirect *p = chain; in ext4_get_branch()
200 * @ind: descriptor of indirect block.
206 * + if pointer will live in indirect block - allocate near that block.
217 static ext4_fsblk_t ext4_find_near(struct inode *inode, Indirect *ind) in ext4_find_near()
229 /* No such thing, so let's try location of indirect block */ in ext4_find_near()
252 Indirect *partial) in ext4_find_goal()
269 * @branch: chain of indirect blocks
270 * @k: number of blocks need for indirect blocks
272 * @blocks_to_boundary: the offset in the indirect block
275 * direct and indirect blocks.
277 static int ext4_blks_to_allocate(Indirect *branch, int k, unsigned int blks, in ext4_blks_to_allocate()
283 * Simple case, [t,d]Indirect block(s) has not allocated yet in ext4_blks_to_allocate()
307 * @indirect_blks: number of allocated indirect blocks
331 Indirect *branch) in ext4_alloc_branch()
399 * We want to ext4_forget() only freshly allocated indirect in ext4_alloc_branch()
401 * (buffer at branch[0].bh is indirect block / inode already in ext4_alloc_branch()
419 * @num: number of indirect blocks we are adding
427 Indirect *where, int num) in ext4_splice_branch()
434 * If we're splicing into a [td]indirect block (as opposed to the in ext4_splice_branch()
435 * inode) then we need to get write access to the [td]indirect block in ext4_splice_branch()
460 /* had we spliced it onto indirect block? */ in ext4_splice_branch()
463 * If we spliced it onto an indirect block, we haven't in ext4_splice_branch()
465 * onto an indirect block at the very end of the file (the in ext4_splice_branch()
470 ext4_debug("splicing indirect only\n"); in ext4_splice_branch()
504 * (i.e., using the traditional indirect/double-indirect i_blocks
537 Indirect chain[4]; in ext4_ind_map_blocks()
538 Indirect *partial; in ext4_ind_map_blocks()
595 /* Failed read of indirect block */ in ext4_ind_map_blocks()
622 /* the number of blocks need to allocate for [d,t]indirect blocks */ in ext4_ind_map_blocks()
626 * Next look up the indirect map to count the totoal number of in ext4_ind_map_blocks()
676 * Calculate number of indirect blocks touched by mapping @nrblocks logically
683 * N/EXT4_ADDR_PER_BLOCK(inode->i_sb) + 1 indirect blocks, in ext4_ind_trans_blocks()
763 * ext4_find_shared - find the indirect blocks for partial truncation.
767 * @chain: place to store the pointers to partial indirect blocks
773 * indirect blocks but leave the blocks themselves alive. Block is
797 static Indirect *ext4_find_shared(struct inode *inode, int depth, in ext4_find_shared()
798 ext4_lblk_t offsets[4], Indirect chain[4], in ext4_find_shared()
801 Indirect *partial, *p; in ext4_find_shared()
847 * Zero a number of block pointers in either an inode or an indirect block.
849 * indirect block for further modification.
899 * @this_bh: indirect buffer_head which contains *@first and *@last
928 if (this_bh) { /* For indirect block */ in ext4_free_data()
932 /* Important: if we can't update the indirect pointers in ext4_free_data()
973 * point. However, if the data is corrupted and an indirect in ext4_free_data()
981 "circular indirect block detected at " in ext4_free_data()
1021 "invalid indirect mapped " in ext4_free_branches()
1052 * We want the freeing of this indirect block to be in ext4_free_branches()
1078 * indirect block if it gets reallocated as a in ext4_free_branches()
1090 * pointed to by an indirect block: journal it in ext4_free_branches()
1118 Indirect chain[4]; in ext4_ind_truncate()
1119 Indirect *partial; in ext4_ind_truncate()
1150 * equal to the indirect block limit. in ext4_ind_truncate()
1172 /* Shared branch grows from an indirect block */ in ext4_ind_truncate()
1179 /* Clear the ends of indirect blocks on the shared branch */ in ext4_ind_truncate()
1234 Indirect chain[4], chain2[4]; in ext4_ind_remove_space()
1235 Indirect *partial, *partial2; in ext4_ind_remove_space()
1236 Indirect *p = NULL, *p2 = NULL; in ext4_ind_remove_space()
1286 /* Shared branch grows from an indirect block */ in ext4_ind_remove_space()
1295 * Clear the ends of indirect blocks on the shared branch in ext4_ind_remove_space()
1320 * ext4_find_shared returns Indirect structure which in ext4_ind_remove_space()
1329 * Clear the ends of indirect blocks on the shared branch in ext4_ind_remove_space()
1367 /* Shared branch grows from an indirect block */ in ext4_ind_remove_space()
1379 * ext4_find_shared returns Indirect structure which in ext4_ind_remove_space()