Lines Matching defs:block

20  *  Goal-directed block allocation by Stephen Tweedie
44 * ext4_block_to_path - parse the block number into array of offsets
46 * @i_block: block number to be parsed
48 * @boundary: set this non-zero if the referred-to block is likely to be
49 * followed (on disk) by an indirect block.
54 * This function translates the block number into path in that tree -
56 * pointer to (n+1)th node in the nth one. If @block is out of range
66 * indirect block) is spelled differently, because otherwise on an
105 ext4_warning(inode->i_sb, "block %lu > max in inode %lu",
125 * the number of (i+1)-th block in the chain (as it is stored in memory,
129 * block for i>0 and NULL for i==0. In other words, it holds the block
134 * Function stops when it stumbles upon zero pointer (absent block)
136 * or when it gets an IO error reading an indirect block
162 /* the block was out of range */
177 /* validate block references */
200 * @ind: descriptor of indirect block.
202 * This function returns the preferred place for block allocation.
205 * + if there is a block to the left of our position - allocate near it.
206 * + if pointer will live in indirect block - allocate near that block.
210 * In the latter case we colour the starting block by the callers PID to
212 * in the same block group. The PID is used here so that functionally related
223 /* Try to find previous block */
229 /* No such thing, so let's try location of indirect block */
243 * @block: block we want
246 * Normally this function find the preferred place for block allocation,
248 * Because this is only used for non-extent files, we limit the block nr
251 static ext4_fsblk_t ext4_find_goal(struct inode *inode, ext4_lblk_t block,
257 * XXX need to get goal block from mballoc's data structures
266 * ext4_blks_to_allocate - Look up the block map and count the number
272 * @blocks_to_boundary: the offset in the indirect block
283 * Simple case, [t,d]Indirect block(s) has not allocated yet
401 * (buffer at branch[0].bh is indirect block / inode already
423 * chain to new block and return 0.
434 * If we're splicing into a [td]indirect block (as opposed to the
435 * inode) then we need to get write access to the [td]indirect block
460 /* had we spliced it onto indirect block? */
463 * If we spliced it onto an indirect block, we haven't
465 * onto an indirect block at the very end of the file (the
477 * OK, we spliced it into the inode itself on a direct block.
490 * need to revoke the block, which is why we don't
513 * write on the parent block.
556 /* Simplest case - block found, no allocation needed */
595 /* Failed read of indirect block */
600 * Okay, we need to do block allocation.
609 /* Set up for the direct block allocation */
656 * Update reserved blocks/metadata blocks after successful block
691 * 2 dindirect blocks, and 1 tindirect block
783 * data block, indeed). We have to free the top of that path along
791 * block number of its root in *@top, pointers to buffer_heads of
829 * OK, we've found the last block that must survive. The rest of our
854 * Zero a number of block pointers in either an inode or an indirect block.
856 * indirect block for further modification.
861 * Return 0 on success, 1 on invalid block range
907 * @first: array of block numbers
919 * block pointers.
925 ext4_fsblk_t block_to_free = 0; /* Starting block # of a run */
930 ext4_fsblk_t nr; /* Current block # */
932 for current block */
935 if (this_bh) { /* For indirect block */
981 * block pointed to itself, it would have been detached when
982 * the block was cleared. Check for this instead of OOPSing.
988 "circular indirect block detected at "
989 "block %llu",
999 * @first: array of block numbers
1029 "block %lu (level %d)",
1047 /* This zaps the entire block. Bottom up. */
1059 * We want the freeing of this indirect block to be
1061 * bitmap block which owns it. So make some room in
1068 * will merely complain about releasing a free block,
1085 * indirect block if it gets reallocated as a
1086 * data block. This must happen in the same
1096 * The block which we have just freed is
1097 * pointed to by an indirect block: journal it
1157 * equal to the indirect block limit.
1179 /* Shared branch grows from an indirect block */
1228 * @start: First block to remove
1229 * @end: One block after the last block to remove (exclusive)
1262 /* We're punching only within direct block range */
1269 * free partial block at start, and partial block at end of
1276 * Start is at the direct block level, free
1293 /* Shared branch grows from an indirect block */
1374 /* Shared branch grows from an indirect block */
1401 * We've converged on the same block. Clear the range,
1416 * block.