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
538 Indirect *partial; in ext4_ind_map_blocks() local
554 partial = ext4_get_branch(inode, depth, offsets, chain, &err); in ext4_ind_map_blocks()
557 if (!partial) { in ext4_ind_map_blocks()
580 * Count number blocks in a subtree under 'partial'. At each in ext4_ind_map_blocks()
586 for (i = partial - chain + 1; i < depth; i++) in ext4_ind_map_blocks()
620 ar.goal = ext4_find_goal(inode, map->m_lblk, partial); in ext4_ind_map_blocks()
623 indirect_blks = (chain + depth) - partial - 1; in ext4_ind_map_blocks()
629 ar.len = ext4_blks_to_allocate(partial, indirect_blks, in ext4_ind_map_blocks()
636 offsets + (partial - chain), partial); in ext4_ind_map_blocks()
646 err = ext4_splice_branch(handle, &ar, partial, indirect_blks); in ext4_ind_map_blocks()
663 partial = chain + depth - 1; /* the whole chain */ in ext4_ind_map_blocks()
665 while (partial > chain) { in ext4_ind_map_blocks()
666 BUFFER_TRACE(partial->bh, "call brelse"); in ext4_ind_map_blocks()
667 brelse(partial->bh); in ext4_ind_map_blocks()
668 partial--; in ext4_ind_map_blocks()
763 * ext4_find_shared - find the indirect blocks for partial truncation.
767 * @chain: place to store the pointers to partial indirect blocks
801 Indirect *partial, *p; in ext4_find_shared() local
808 partial = ext4_get_branch(inode, k, offsets, chain, &err); in ext4_find_shared()
810 if (!partial) in ext4_find_shared()
811 partial = chain + k-1; in ext4_find_shared()
816 if (!partial->key && *partial->p) in ext4_find_shared()
819 for (p = partial; (p > chain) && all_zeroes((__le32 *) p->bh->b_data, p->p); p--) in ext4_find_shared()
825 * it's easier to cheat and just decrement partial->p. in ext4_find_shared()
838 while (partial > p) { in ext4_find_shared()
839 brelse(partial->bh); in ext4_find_shared()
840 partial--; in ext4_find_shared()
843 return partial; in ext4_find_shared()
1119 Indirect *partial; in ext4_ind_truncate() local
1159 partial = ext4_find_shared(inode, n, offsets, chain, &nr); in ext4_ind_truncate()
1162 if (partial == chain) { in ext4_ind_truncate()
1165 &nr, &nr+1, (chain+n-1) - partial); in ext4_ind_truncate()
1166 *partial->p = 0; in ext4_ind_truncate()
1173 BUFFER_TRACE(partial->bh, "get_write_access"); in ext4_ind_truncate()
1174 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_truncate()
1175 partial->p, in ext4_ind_truncate()
1176 partial->p+1, (chain+n-1) - partial); in ext4_ind_truncate()
1180 while (partial > chain) { in ext4_ind_truncate()
1181 ext4_free_branches(handle, inode, partial->bh, partial->p + 1, in ext4_ind_truncate()
1182 (__le32*)partial->bh->b_data+addr_per_block, in ext4_ind_truncate()
1183 (chain+n-1) - partial); in ext4_ind_truncate()
1184 BUFFER_TRACE(partial->bh, "call brelse"); in ext4_ind_truncate()
1185 brelse(partial->bh); in ext4_ind_truncate()
1186 partial--; in ext4_ind_truncate()
1235 Indirect *partial, *partial2; in ext4_ind_remove_space() local
1262 * free partial block at start, and partial block at end of in ext4_ind_remove_space()
1278 partial = p = ext4_find_shared(inode, n, offsets, chain, &nr); in ext4_ind_remove_space()
1280 if (partial == chain) { in ext4_ind_remove_space()
1283 &nr, &nr+1, (chain+n-1) - partial); in ext4_ind_remove_space()
1284 *partial->p = 0; in ext4_ind_remove_space()
1287 BUFFER_TRACE(partial->bh, "get_write_access"); in ext4_ind_remove_space()
1288 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1289 partial->p, in ext4_ind_remove_space()
1290 partial->p+1, (chain+n-1) - partial); in ext4_ind_remove_space()
1298 while (partial > chain) { in ext4_ind_remove_space()
1299 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1300 partial->p + 1, in ext4_ind_remove_space()
1301 (__le32 *)partial->bh->b_data+addr_per_block, in ext4_ind_remove_space()
1302 (chain+n-1) - partial); in ext4_ind_remove_space()
1303 partial--; in ext4_ind_remove_space()
1343 partial = p = ext4_find_shared(inode, n, offsets, chain, &nr); in ext4_ind_remove_space()
1348 int level = min(partial - chain, partial2 - chain2); in ext4_ind_remove_space()
1360 if (partial == chain) { in ext4_ind_remove_space()
1364 (chain+n-1) - partial); in ext4_ind_remove_space()
1365 *partial->p = 0; in ext4_ind_remove_space()
1368 BUFFER_TRACE(partial->bh, "get_write_access"); in ext4_ind_remove_space()
1369 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1370 partial->p, in ext4_ind_remove_space()
1371 partial->p+1, in ext4_ind_remove_space()
1372 (chain+n-1) - partial); in ext4_ind_remove_space()
1387 while (partial > chain || partial2 > chain2) { in ext4_ind_remove_space()
1388 int depth = (chain+n-1) - partial; in ext4_ind_remove_space()
1391 if (partial > chain && partial2 > chain2 && in ext4_ind_remove_space()
1392 partial->bh->b_blocknr == partial2->bh->b_blocknr) { in ext4_ind_remove_space()
1397 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1398 partial->p + 1, in ext4_ind_remove_space()
1400 (chain+n-1) - partial); in ext4_ind_remove_space()
1405 * The start and end partial branches may not be at the same in ext4_ind_remove_space()
1411 if (partial > chain && depth <= depth2) { in ext4_ind_remove_space()
1412 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1413 partial->p + 1, in ext4_ind_remove_space()
1414 (__le32 *)partial->bh->b_data+addr_per_block, in ext4_ind_remove_space()
1415 (chain+n-1) - partial); in ext4_ind_remove_space()
1416 partial--; in ext4_ind_remove_space()