Lines Matching full:partial
244 * @partial: pointer to the last triple within a chain
252 Indirect *partial) in ext4_find_goal() argument
260 goal = ext4_find_near(inode, partial); in ext4_find_goal()
316 * we had read the existing part of chain and partial points to the last
536 Indirect *partial; in ext4_ind_map_blocks() local
552 partial = ext4_get_branch(inode, depth, offsets, chain, &err); in ext4_ind_map_blocks()
555 if (!partial) { in ext4_ind_map_blocks()
578 * Count number blocks in a subtree under 'partial'. At each in ext4_ind_map_blocks()
584 for (i = partial - chain + 1; i < depth; i++) in ext4_ind_map_blocks()
618 ar.goal = ext4_find_goal(inode, map->m_lblk, partial); in ext4_ind_map_blocks()
621 indirect_blks = (chain + depth) - partial - 1; in ext4_ind_map_blocks()
627 ar.len = ext4_blks_to_allocate(partial, indirect_blks, in ext4_ind_map_blocks()
634 offsets + (partial - chain), partial); in ext4_ind_map_blocks()
644 err = ext4_splice_branch(handle, &ar, partial, indirect_blks); in ext4_ind_map_blocks()
668 partial = chain + depth - 1; /* the whole chain */ in ext4_ind_map_blocks()
670 while (partial > chain) { in ext4_ind_map_blocks()
671 BUFFER_TRACE(partial->bh, "call brelse"); in ext4_ind_map_blocks()
672 brelse(partial->bh); in ext4_ind_map_blocks()
673 partial--; in ext4_ind_map_blocks()
767 * ext4_find_shared - find the indirect blocks for partial truncation.
771 * @chain: place to store the pointers to partial indirect blocks
805 Indirect *partial, *p; in ext4_find_shared() local
812 partial = ext4_get_branch(inode, k, offsets, chain, &err); in ext4_find_shared()
814 if (!partial) in ext4_find_shared()
815 partial = chain + k-1; in ext4_find_shared()
820 if (!partial->key && *partial->p) in ext4_find_shared()
823 for (p = partial; (p > chain) && all_zeroes((__le32 *) p->bh->b_data, p->p); p--) in ext4_find_shared()
829 * it's easier to cheat and just decrement partial->p. in ext4_find_shared()
842 while (partial > p) { in ext4_find_shared()
843 brelse(partial->bh); in ext4_find_shared()
844 partial--; in ext4_find_shared()
847 return partial; in ext4_find_shared()
1121 Indirect *partial; in ext4_ind_truncate() local
1161 partial = ext4_find_shared(inode, n, offsets, chain, &nr); in ext4_ind_truncate()
1164 if (partial == chain) { in ext4_ind_truncate()
1167 &nr, &nr+1, (chain+n-1) - partial); in ext4_ind_truncate()
1168 *partial->p = 0; in ext4_ind_truncate()
1175 BUFFER_TRACE(partial->bh, "get_write_access"); in ext4_ind_truncate()
1176 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_truncate()
1177 partial->p, in ext4_ind_truncate()
1178 partial->p+1, (chain+n-1) - partial); in ext4_ind_truncate()
1182 while (partial > chain) { in ext4_ind_truncate()
1183 ext4_free_branches(handle, inode, partial->bh, partial->p + 1, in ext4_ind_truncate()
1184 (__le32*)partial->bh->b_data+addr_per_block, in ext4_ind_truncate()
1185 (chain+n-1) - partial); in ext4_ind_truncate()
1186 BUFFER_TRACE(partial->bh, "call brelse"); in ext4_ind_truncate()
1187 brelse(partial->bh); in ext4_ind_truncate()
1188 partial--; in ext4_ind_truncate()
1237 Indirect *partial, *partial2; in ext4_ind_remove_space() local
1264 * free partial block at start, and partial block at end of in ext4_ind_remove_space()
1280 partial = p = ext4_find_shared(inode, n, offsets, chain, &nr); in ext4_ind_remove_space()
1282 if (partial == chain) { in ext4_ind_remove_space()
1285 &nr, &nr+1, (chain+n-1) - partial); in ext4_ind_remove_space()
1286 *partial->p = 0; in ext4_ind_remove_space()
1289 BUFFER_TRACE(partial->bh, "get_write_access"); in ext4_ind_remove_space()
1290 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1291 partial->p, in ext4_ind_remove_space()
1292 partial->p+1, (chain+n-1) - partial); in ext4_ind_remove_space()
1300 while (partial > chain) { in ext4_ind_remove_space()
1301 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1302 partial->p + 1, in ext4_ind_remove_space()
1303 (__le32 *)partial->bh->b_data+addr_per_block, in ext4_ind_remove_space()
1304 (chain+n-1) - partial); in ext4_ind_remove_space()
1305 partial--; in ext4_ind_remove_space()
1345 partial = p = ext4_find_shared(inode, n, offsets, chain, &nr); in ext4_ind_remove_space()
1350 int level = min(partial - chain, partial2 - chain2); in ext4_ind_remove_space()
1362 if (partial == chain) { in ext4_ind_remove_space()
1366 (chain+n-1) - partial); in ext4_ind_remove_space()
1367 *partial->p = 0; in ext4_ind_remove_space()
1370 BUFFER_TRACE(partial->bh, "get_write_access"); in ext4_ind_remove_space()
1371 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1372 partial->p, in ext4_ind_remove_space()
1373 partial->p+1, in ext4_ind_remove_space()
1374 (chain+n-1) - partial); in ext4_ind_remove_space()
1389 while (partial > chain || partial2 > chain2) { in ext4_ind_remove_space()
1390 int depth = (chain+n-1) - partial; in ext4_ind_remove_space()
1393 if (partial > chain && partial2 > chain2 && in ext4_ind_remove_space()
1394 partial->bh->b_blocknr == partial2->bh->b_blocknr) { in ext4_ind_remove_space()
1399 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1400 partial->p + 1, in ext4_ind_remove_space()
1402 (chain+n-1) - partial); in ext4_ind_remove_space()
1407 * The start and end partial branches may not be at the same in ext4_ind_remove_space()
1413 if (partial > chain && depth <= depth2) { in ext4_ind_remove_space()
1414 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1415 partial->p + 1, in ext4_ind_remove_space()
1416 (__le32 *)partial->bh->b_data+addr_per_block, in ext4_ind_remove_space()
1417 (chain+n-1) - partial); in ext4_ind_remove_space()
1418 partial--; in ext4_ind_remove_space()