Lines Matching refs:args
297 struct xfs_da_args *args, in xfs_da3_node_create() argument
304 struct xfs_trans *tp = args->trans; in xfs_da3_node_create()
309 struct xfs_inode *dp = args->dp; in xfs_da3_node_create()
311 trace_xfs_da_node_create(args); in xfs_da3_node_create()
326 hdr3->info.owner = cpu_to_be64(args->dp->i_ino); in xfs_da3_node_create()
359 trace_xfs_da_split(state->args); in xfs_da3_split()
399 trace_xfs_attr_leaf_split_before(state->args); in xfs_da3_split()
404 trace_xfs_attr_leaf_split_after(state->args); in xfs_da3_split()
474 xfs_trans_log_buf(state->args->trans, bp, in xfs_da3_split()
488 xfs_trans_log_buf(state->args->trans, bp, in xfs_da3_split()
511 struct xfs_da_args *args; in xfs_da3_root_split() local
521 trace_xfs_da_root_split(state->args); in xfs_da3_root_split()
527 args = state->args; in xfs_da3_root_split()
528 error = xfs_da_grow_inode(args, &blkno); in xfs_da3_root_split()
532 dp = args->dp; in xfs_da3_root_split()
533 tp = args->trans; in xfs_da3_root_split()
534 error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, args->whichfork); in xfs_da3_root_split()
596 error = xfs_da3_node_create(args, in xfs_da3_root_split()
597 (args->whichfork == XFS_DATA_FORK) ? args->geo->leafblk : 0, in xfs_da3_root_split()
598 level + 1, &bp, args->whichfork); in xfs_da3_root_split()
615 ASSERT(blk1->blkno >= args->geo->leafblk && in xfs_da3_root_split()
616 blk1->blkno < args->geo->freeblk); in xfs_da3_root_split()
617 ASSERT(blk2->blkno >= args->geo->leafblk && in xfs_da3_root_split()
618 blk2->blkno < args->geo->freeblk); in xfs_da3_root_split()
647 struct xfs_inode *dp = state->args->dp; in xfs_da3_node_split()
649 trace_xfs_da_node_split(state->args); in xfs_da3_node_split()
657 useextra = state->extravalid && state->args->whichfork == XFS_ATTR_FORK; in xfs_da3_node_split()
662 if (nodehdr.count + newcount > state->args->geo->node_ents) { in xfs_da3_node_split()
667 error = xfs_da_grow_inode(state->args, &blkno); in xfs_da3_node_split()
671 error = xfs_da3_node_create(state->args, blkno, treelevel, in xfs_da3_node_split()
672 &newblk->bp, state->args->whichfork); in xfs_da3_node_split()
748 struct xfs_inode *dp = state->args->dp; in xfs_da3_node_rebalance()
750 trace_xfs_da_node_rebalance(state->args); in xfs_da3_node_rebalance()
780 tp = state->args->trans; in xfs_da3_node_rebalance()
882 struct xfs_inode *dp = state->args->dp; in xfs_da3_node_add()
884 trace_xfs_da_node_add(state->args); in xfs_da3_node_add()
892 if (state->args->whichfork == XFS_DATA_FORK) in xfs_da3_node_add()
893 ASSERT(newblk->blkno >= state->args->geo->leafblk && in xfs_da3_node_add()
894 newblk->blkno < state->args->geo->freeblk); in xfs_da3_node_add()
906 xfs_trans_log_buf(state->args->trans, oldblk->bp, in xfs_da3_node_add()
912 xfs_trans_log_buf(state->args->trans, oldblk->bp, in xfs_da3_node_add()
938 trace_xfs_da_join(state->args); in xfs_da3_join()
995 error = xfs_da_shrink_inode(state->args, drop_blk->blkno, in xfs_da3_join()
1044 struct xfs_da_args *args; in xfs_da3_root_join() local
1050 struct xfs_inode *dp = state->args->dp; in xfs_da3_root_join()
1052 trace_xfs_da_root_join(state->args); in xfs_da3_root_join()
1056 args = state->args; in xfs_da3_root_join()
1075 error = xfs_da3_node_read(args->trans, dp, child, -1, &bp, in xfs_da3_root_join()
1076 args->whichfork); in xfs_da3_root_join()
1088 memcpy(root_blk->bp->b_addr, bp->b_addr, args->geo->blksize); in xfs_da3_root_join()
1095 xfs_trans_log_buf(args->trans, root_blk->bp, 0, in xfs_da3_root_join()
1096 args->geo->blksize - 1); in xfs_da3_root_join()
1097 error = xfs_da_shrink_inode(args, child, bp); in xfs_da3_root_join()
1126 struct xfs_inode *dp = state->args->dp; in xfs_da3_node_toosmall()
1128 trace_xfs_da_node_toosmall(state->args); in xfs_da3_node_toosmall()
1139 if (nodehdr.count > (state->args->geo->node_ents >> 1)) { in xfs_da3_node_toosmall()
1176 count = state->args->geo->node_ents; in xfs_da3_node_toosmall()
1177 count -= state->args->geo->node_ents >> 2; in xfs_da3_node_toosmall()
1190 error = xfs_da3_node_read(state->args->trans, dp, in xfs_da3_node_toosmall()
1191 blkno, -1, &bp, state->args->whichfork); in xfs_da3_node_toosmall()
1197 xfs_trans_brelse(state->args->trans, bp); in xfs_da3_node_toosmall()
1267 struct xfs_inode *dp = state->args->dp; in xfs_da3_fixhashpath()
1269 trace_xfs_da_fixhashpath(state->args); in xfs_da3_fixhashpath()
1300 xfs_trans_log_buf(state->args->trans, blk->bp, in xfs_da3_fixhashpath()
1321 struct xfs_inode *dp = state->args->dp; in xfs_da3_node_remove()
1323 trace_xfs_da_node_remove(state->args); in xfs_da3_node_remove()
1339 xfs_trans_log_buf(state->args->trans, drop_blk->bp, in xfs_da3_node_remove()
1344 xfs_trans_log_buf(state->args->trans, drop_blk->bp, in xfs_da3_node_remove()
1348 xfs_trans_log_buf(state->args->trans, drop_blk->bp, in xfs_da3_node_remove()
1376 struct xfs_inode *dp = state->args->dp; in xfs_da3_node_unbalance()
1378 trace_xfs_da_node_unbalance(state->args); in xfs_da3_node_unbalance()
1386 tp = state->args->trans; in xfs_da3_node_unbalance()
1455 struct xfs_da_args *args; in xfs_da3_node_lookup_int() local
1464 struct xfs_inode *dp = state->args->dp; in xfs_da3_node_lookup_int()
1466 args = state->args; in xfs_da3_node_lookup_int()
1472 blkno = (args->whichfork == XFS_DATA_FORK)? args->geo->leafblk : 0; in xfs_da3_node_lookup_int()
1480 error = xfs_da3_node_read(args->trans, args->dp, blkno, in xfs_da3_node_lookup_int()
1481 -1, &blk->bp, args->whichfork); in xfs_da3_node_lookup_int()
1500 blk->hashval = xfs_dir2_leafn_lasthash(args->dp, in xfs_da3_node_lookup_int()
1522 hashval = args->hashval; in xfs_da3_node_lookup_int()
1570 retval = xfs_dir2_leafn_lookup_int(blk->bp, args, in xfs_da3_node_lookup_int()
1573 retval = xfs_attr3_leaf_lookup_int(blk->bp, args); in xfs_da3_node_lookup_int()
1574 blk->index = args->index; in xfs_da3_node_lookup_int()
1575 args->blkno = blk->blkno; in xfs_da3_node_lookup_int()
1581 (blk->hashval == args->hashval)) { in xfs_da3_node_lookup_int()
1647 struct xfs_da_args *args; in xfs_da3_blk_link() local
1651 struct xfs_inode *dp = state->args->dp; in xfs_da3_blk_link()
1656 args = state->args; in xfs_da3_blk_link()
1657 ASSERT(args != NULL); in xfs_da3_blk_link()
1683 trace_xfs_da_link_before(args); in xfs_da3_blk_link()
1687 error = xfs_da3_node_read(args->trans, dp, in xfs_da3_blk_link()
1689 -1, &bp, args->whichfork); in xfs_da3_blk_link()
1697 xfs_trans_log_buf(args->trans, bp, 0, sizeof(*tmp_info)-1); in xfs_da3_blk_link()
1704 trace_xfs_da_link_after(args); in xfs_da3_blk_link()
1708 error = xfs_da3_node_read(args->trans, dp, in xfs_da3_blk_link()
1710 -1, &bp, args->whichfork); in xfs_da3_blk_link()
1718 xfs_trans_log_buf(args->trans, bp, 0, sizeof(*tmp_info)-1); in xfs_da3_blk_link()
1723 xfs_trans_log_buf(args->trans, old_blk->bp, 0, sizeof(*tmp_info) - 1); in xfs_da3_blk_link()
1724 xfs_trans_log_buf(args->trans, new_blk->bp, 0, sizeof(*tmp_info) - 1); in xfs_da3_blk_link()
1740 struct xfs_da_args *args; in xfs_da3_blk_unlink() local
1747 args = state->args; in xfs_da3_blk_unlink()
1748 ASSERT(args != NULL); in xfs_da3_blk_unlink()
1764 trace_xfs_da_unlink_back(args); in xfs_da3_blk_unlink()
1767 error = xfs_da3_node_read(args->trans, args->dp, in xfs_da3_blk_unlink()
1769 -1, &bp, args->whichfork); in xfs_da3_blk_unlink()
1777 xfs_trans_log_buf(args->trans, bp, 0, in xfs_da3_blk_unlink()
1781 trace_xfs_da_unlink_forward(args); in xfs_da3_blk_unlink()
1784 error = xfs_da3_node_read(args->trans, args->dp, in xfs_da3_blk_unlink()
1786 -1, &bp, args->whichfork); in xfs_da3_blk_unlink()
1794 xfs_trans_log_buf(args->trans, bp, 0, in xfs_da3_blk_unlink()
1799 xfs_trans_log_buf(args->trans, save_blk->bp, 0, sizeof(*save_info) - 1); in xfs_da3_blk_unlink()
1822 struct xfs_da_args *args; in xfs_da3_path_shift() local
1828 struct xfs_inode *dp = state->args->dp; in xfs_da3_path_shift()
1830 trace_xfs_da_path_shift(state->args); in xfs_da3_path_shift()
1837 args = state->args; in xfs_da3_path_shift()
1838 ASSERT(args != NULL); in xfs_da3_path_shift()
1859 ASSERT(args->op_flags & XFS_DA_OP_OKNOENT); in xfs_da3_path_shift()
1873 xfs_trans_brelse(args->trans, blk->bp); in xfs_da3_path_shift()
1879 error = xfs_da3_node_read(args->trans, dp, blkno, -1, in xfs_da3_path_shift()
1880 &blk->bp, args->whichfork); in xfs_da3_path_shift()
1922 blk->hashval = xfs_dir2_leafn_lasthash(args->dp, in xfs_da3_path_shift()
1974 struct xfs_da_args *args, in xfs_da_compname() argument
1978 return (args->namelen == len && memcmp(args->name, name, len) == 0) ? in xfs_da_compname()
1996 struct xfs_da_args *args, in xfs_da_grow_inode_int() argument
2000 struct xfs_trans *tp = args->trans; in xfs_da_grow_inode_int()
2001 struct xfs_inode *dp = args->dp; in xfs_da_grow_inode_int()
2002 int w = args->whichfork; in xfs_da_grow_inode_int()
2018 ASSERT(args->firstblock != NULL); in xfs_da_grow_inode_int()
2021 args->firstblock, args->total, &map, &nmap, in xfs_da_grow_inode_int()
2022 args->flist); in xfs_da_grow_inode_int()
2044 args->firstblock, args->total, in xfs_da_grow_inode_int()
2045 &mapp[mapi], &nmap, args->flist); in xfs_da_grow_inode_int()
2072 args->total -= dp->i_d.di_nblocks - nblks; in xfs_da_grow_inode_int()
2086 struct xfs_da_args *args, in xfs_da_grow_inode() argument
2092 trace_xfs_da_grow_inode(args); in xfs_da_grow_inode()
2094 bno = args->geo->leafblk; in xfs_da_grow_inode()
2095 error = xfs_da_grow_inode_int(args, &bno, args->geo->fsbcount); in xfs_da_grow_inode()
2111 struct xfs_da_args *args, in xfs_da3_swap_lastblock() argument
2141 trace_xfs_da_swap_lastblock(args); in xfs_da3_swap_lastblock()
2145 tp = args->trans; in xfs_da3_swap_lastblock()
2146 dp = args->dp; in xfs_da3_swap_lastblock()
2147 w = args->whichfork; in xfs_da3_swap_lastblock()
2150 lastoff = args->geo->freeblk; in xfs_da3_swap_lastblock()
2162 last_blkno = (xfs_dablk_t)lastoff - args->geo->fsbcount; in xfs_da3_swap_lastblock()
2169 memcpy(dead_buf->b_addr, last_buf->b_addr, args->geo->blksize); in xfs_da3_swap_lastblock()
2170 xfs_trans_log_buf(tp, dead_buf, 0, args->geo->blksize - 1); in xfs_da3_swap_lastblock()
2239 par_blkno = args->geo->leafblk; in xfs_da3_swap_lastblock()
2334 xfs_da_args_t *args, in xfs_da_shrink_inode() argument
2342 trace_xfs_da_shrink_inode(args); in xfs_da_shrink_inode()
2344 dp = args->dp; in xfs_da_shrink_inode()
2345 w = args->whichfork; in xfs_da_shrink_inode()
2346 tp = args->trans; in xfs_da_shrink_inode()
2347 count = args->geo->fsbcount; in xfs_da_shrink_inode()
2355 0, args->firstblock, args->flist, &done); in xfs_da_shrink_inode()
2359 error = xfs_da3_swap_lastblock(args, &dead_blkno, in xfs_da_shrink_inode()