Lines Matching refs:dp

56 #define	xfs_dir3_leaf_check(dp, bp) \  argument
58 if (!xfs_dir3_leafn_check((dp), (bp))) \
64 struct xfs_inode *dp, in xfs_dir3_leafn_check() argument
70 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leafn_check()
79 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); in xfs_dir3_leafn_check()
82 #define xfs_dir3_leaf_check(dp, bp) argument
162 struct xfs_inode *dp, in __xfs_dir3_free_read() argument
169 err = xfs_da_read_buf(tp, dp, fbno, mappedbno, bpp, in __xfs_dir3_free_read()
181 struct xfs_inode *dp, in xfs_dir2_free_read() argument
185 return __xfs_dir3_free_read(tp, dp, fbno, -1, bpp); in xfs_dir2_free_read()
191 struct xfs_inode *dp, in xfs_dir2_free_try_read() argument
195 return __xfs_dir3_free_read(tp, dp, fbno, -2, bpp); in xfs_dir2_free_try_read()
205 struct xfs_inode *dp = args->dp; in xfs_dir3_free_get_buf() local
206 struct xfs_mount *mp = dp->i_mount; in xfs_dir3_free_get_buf()
211 error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(args->geo, fbno), in xfs_dir3_free_get_buf()
232 hdr3->hdr.owner = cpu_to_be64(dp->i_ino); in xfs_dir3_free_get_buf()
236 dp->d_ops->free_hdr_to_disk(bp->b_addr, &hdr); in xfs_dir3_free_get_buf()
255 bests = args->dp->d_ops->free_bests_p(free); in xfs_dir2_free_log_bests()
280 args->dp->d_ops->free_hdr_size - 1); in xfs_dir2_free_log_header()
293 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_leaf_to_node() local
310 dp = args->dp; in xfs_dir2_leaf_to_node()
327 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_leaf_to_node()
331 (uint)dp->i_d.di_size / args->geo->blksize); in xfs_dir2_leaf_to_node()
338 to = dp->d_ops->free_bests_p(free); in xfs_dir2_leaf_to_node()
351 dp->d_ops->free_hdr_to_disk(fbp->b_addr, &freehdr); in xfs_dir2_leaf_to_node()
368 xfs_dir3_leaf_check(dp, lbp); in xfs_dir2_leaf_to_node()
383 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_leafn_add() local
395 dp = args->dp; in xfs_dir2_leafn_add()
397 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_add()
398 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_add()
414 if (leafhdr.count == dp->d_ops->leaf_max_ents(args->geo)) { in xfs_dir2_leafn_add()
452 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leafn_add()
455 xfs_dir3_leaf_check(dp, bp); in xfs_dir2_leafn_add()
462 struct xfs_inode *dp, in xfs_dir2_free_hdr_check() argument
468 dp->d_ops->free_hdr_from_disk(&hdr, bp->b_addr); in xfs_dir2_free_hdr_check()
471 dp->d_ops->free_max_bests(dp->i_mount->m_dir_geo)) == 0); in xfs_dir2_free_hdr_check()
476 #define xfs_dir2_free_hdr_check(dp, bp, db) argument
485 struct xfs_inode *dp, in xfs_dir2_leafn_lasthash() argument
493 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lasthash()
503 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_lasthash()
521 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_leafn_lookup_for_addname() local
536 dp = args->dp; in xfs_dir2_leafn_lookup_for_addname()
538 mp = dp->i_mount; in xfs_dir2_leafn_lookup_for_addname()
540 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lookup_for_addname()
541 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_lookup_for_addname()
543 xfs_dir3_leaf_check(dp, bp); in xfs_dir2_leafn_lookup_for_addname()
561 length = dp->d_ops->data_entsize(args->namelen); in xfs_dir2_leafn_lookup_for_addname()
594 newfdb = dp->d_ops->db_to_fdb(args->geo, newdb); in xfs_dir2_leafn_lookup_for_addname()
605 error = xfs_dir2_free_read(tp, dp, in xfs_dir2_leafn_lookup_for_addname()
613 xfs_dir2_free_hdr_check(dp, curbp, curdb); in xfs_dir2_leafn_lookup_for_addname()
618 fi = dp->d_ops->db_to_fdindex(args->geo, curdb); in xfs_dir2_leafn_lookup_for_addname()
622 bests = dp->d_ops->free_bests_p(free); in xfs_dir2_leafn_lookup_for_addname()
676 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_leafn_lookup_for_entry() local
688 dp = args->dp; in xfs_dir2_leafn_lookup_for_entry()
690 mp = dp->i_mount; in xfs_dir2_leafn_lookup_for_entry()
692 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lookup_for_entry()
693 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_lookup_for_entry()
695 xfs_dir3_leaf_check(dp, bp); in xfs_dir2_leafn_lookup_for_entry()
748 error = xfs_dir3_data_read(tp, dp, in xfs_dir2_leafn_lookup_for_entry()
755 xfs_dir3_data_check(dp, curbp); in xfs_dir2_leafn_lookup_for_entry()
777 args->filetype = dp->d_ops->data_get_ftype(dep); in xfs_dir2_leafn_lookup_for_entry()
916 struct xfs_inode *dp, in xfs_dir2_leafn_order() argument
927 dp->d_ops->leaf_hdr_from_disk(&hdr1, leaf1); in xfs_dir2_leafn_order()
928 dp->d_ops->leaf_hdr_from_disk(&hdr2, leaf2); in xfs_dir2_leafn_order()
929 ents1 = dp->d_ops->leaf_ents_p(leaf1); in xfs_dir2_leafn_order()
930 ents2 = dp->d_ops->leaf_ents_p(leaf2); in xfs_dir2_leafn_order()
968 struct xfs_inode *dp = state->args->dp; in xfs_dir2_leafn_rebalance() local
974 if ((swap = xfs_dir2_leafn_order(dp, blk1->bp, blk2->bp))) { in xfs_dir2_leafn_rebalance()
983 dp->d_ops->leaf_hdr_from_disk(&hdr1, leaf1); in xfs_dir2_leafn_rebalance()
984 dp->d_ops->leaf_hdr_from_disk(&hdr2, leaf2); in xfs_dir2_leafn_rebalance()
985 ents1 = dp->d_ops->leaf_ents_p(leaf1); in xfs_dir2_leafn_rebalance()
986 ents2 = dp->d_ops->leaf_ents_p(leaf2); in xfs_dir2_leafn_rebalance()
1032 dp->d_ops->leaf_hdr_to_disk(leaf1, &hdr1); in xfs_dir2_leafn_rebalance()
1033 dp->d_ops->leaf_hdr_to_disk(leaf2, &hdr2); in xfs_dir2_leafn_rebalance()
1037 xfs_dir3_leaf_check(dp, blk1->bp); in xfs_dir2_leafn_rebalance()
1038 xfs_dir3_leaf_check(dp, blk2->bp); in xfs_dir2_leafn_rebalance()
1062 xfs_alert(dp->i_mount, in xfs_dir2_leafn_rebalance()
1081 struct xfs_inode *dp = args->dp; in xfs_dir3_data_block_free() local
1083 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir3_data_block_free()
1084 bests = dp->d_ops->free_bests_p(free); in xfs_dir3_data_block_free()
1118 dp->d_ops->free_hdr_to_disk(free, &freehdr); in xfs_dir3_data_block_free()
1164 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_leafn_remove() local
1178 dp = args->dp; in xfs_dir2_leafn_remove()
1181 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_remove()
1182 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_remove()
1202 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leafn_remove()
1215 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_leafn_remove()
1219 dp->d_ops->data_entsize(dep->namelen), &needlog, &needscan); in xfs_dir2_leafn_remove()
1225 xfs_dir2_data_freescan(dp, hdr, &needlog); in xfs_dir2_leafn_remove()
1228 xfs_dir3_data_check(dp, dbp); in xfs_dir2_leafn_remove()
1244 fdb = dp->d_ops->db_to_fdb(args->geo, db); in xfs_dir2_leafn_remove()
1245 error = xfs_dir2_free_read(tp, dp, in xfs_dir2_leafn_remove()
1254 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_leafn_remove()
1255 ASSERT(freehdr.firstdb == dp->d_ops->free_max_bests(args->geo) * in xfs_dir2_leafn_remove()
1263 findex = dp->d_ops->db_to_fdindex(args->geo, db); in xfs_dir2_leafn_remove()
1270 dp->d_ops->data_entry_offset) { in xfs_dir2_leafn_remove()
1297 xfs_dir3_leaf_check(dp, bp); in xfs_dir2_leafn_remove()
1302 *rval = (dp->d_ops->leaf_hdr_size + in xfs_dir2_leafn_remove()
1320 struct xfs_inode *dp; in xfs_dir2_leafn_split() local
1326 dp = args->dp; in xfs_dir2_leafn_split()
1361 oldblk->hashval = xfs_dir2_leafn_lasthash(dp, oldblk->bp, NULL); in xfs_dir2_leafn_split()
1362 newblk->hashval = xfs_dir2_leafn_lasthash(dp, newblk->bp, NULL); in xfs_dir2_leafn_split()
1363 xfs_dir3_leaf_check(dp, oldblk->bp); in xfs_dir2_leafn_split()
1364 xfs_dir3_leaf_check(dp, newblk->bp); in xfs_dir2_leafn_split()
1394 struct xfs_inode *dp = state->args->dp; in xfs_dir2_leafn_toosmall() local
1403 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_toosmall()
1404 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_toosmall()
1405 xfs_dir3_leaf_check(dp, blk->bp); in xfs_dir2_leafn_toosmall()
1408 bytes = dp->d_ops->leaf_hdr_size + count * sizeof(ents[0]); in xfs_dir2_leafn_toosmall()
1453 error = xfs_dir3_leafn_read(state->args->trans, dp, in xfs_dir2_leafn_toosmall()
1466 dp->d_ops->leaf_hdr_from_disk(&hdr2, leaf); in xfs_dir2_leafn_toosmall()
1467 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_toosmall()
1521 struct xfs_inode *dp = state->args->dp; in xfs_dir2_leafn_unbalance() local
1529 dp->d_ops->leaf_hdr_from_disk(&savehdr, save_leaf); in xfs_dir2_leafn_unbalance()
1530 dp->d_ops->leaf_hdr_from_disk(&drophdr, drop_leaf); in xfs_dir2_leafn_unbalance()
1531 sents = dp->d_ops->leaf_ents_p(save_leaf); in xfs_dir2_leafn_unbalance()
1532 dents = dp->d_ops->leaf_ents_p(drop_leaf); in xfs_dir2_leafn_unbalance()
1547 if (xfs_dir2_leafn_order(dp, save_blk->bp, drop_blk->bp)) in xfs_dir2_leafn_unbalance()
1558 dp->d_ops->leaf_hdr_to_disk(save_leaf, &savehdr); in xfs_dir2_leafn_unbalance()
1559 dp->d_ops->leaf_hdr_to_disk(drop_leaf, &drophdr); in xfs_dir2_leafn_unbalance()
1563 xfs_dir3_leaf_check(dp, save_blk->bp); in xfs_dir2_leafn_unbalance()
1564 xfs_dir3_leaf_check(dp, drop_blk->bp); in xfs_dir2_leafn_unbalance()
1586 state->mp = args->dp->i_mount; in xfs_dir2_node_addname()
1650 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_node_addname_int() local
1670 dp = args->dp; in xfs_dir2_node_addname_int()
1671 mp = dp->i_mount; in xfs_dir2_node_addname_int()
1673 length = dp->d_ops->data_entsize(args->namelen); in xfs_dir2_node_addname_int()
1687 bests = dp->d_ops->free_bests_p(free); in xfs_dir2_node_addname_int()
1688 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_node_addname_int()
1725 if ((error = xfs_bmap_last_offset(dp, &fo, XFS_DATA_FORK))) in xfs_dir2_node_addname_int()
1763 error = xfs_dir2_free_try_read(tp, dp, in xfs_dir2_node_addname_int()
1781 bests = dp->d_ops->free_bests_p(free); in xfs_dir2_node_addname_int()
1782 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_node_addname_int()
1833 fbno = dp->d_ops->db_to_fdb(args->geo, dbno); in xfs_dir2_node_addname_int()
1834 error = xfs_dir2_free_try_read(tp, dp, in xfs_dir2_node_addname_int()
1850 if (dp->d_ops->db_to_fdb(args->geo, dbno) != fbno) { in xfs_dir2_node_addname_int()
1853 __func__, (unsigned long long)dp->i_ino, in xfs_dir2_node_addname_int()
1854 (long long)dp->d_ops->db_to_fdb( in xfs_dir2_node_addname_int()
1880 bests = dp->d_ops->free_bests_p(free); in xfs_dir2_node_addname_int()
1881 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_node_addname_int()
1889 dp->d_ops->free_max_bests(args->geo); in xfs_dir2_node_addname_int()
1892 bests = dp->d_ops->free_bests_p(free); in xfs_dir2_node_addname_int()
1893 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_node_addname_int()
1899 findex = dp->d_ops->db_to_fdindex(args->geo, dbno); in xfs_dir2_node_addname_int()
1905 ASSERT(findex < dp->d_ops->free_max_bests(args->geo)); in xfs_dir2_node_addname_int()
1918 dp->d_ops->free_hdr_to_disk(fbp->b_addr, &freehdr); in xfs_dir2_node_addname_int()
1927 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_node_addname_int()
1944 error = xfs_dir3_data_read(tp, dp, in xfs_dir2_node_addname_int()
1950 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_node_addname_int()
1973 dp->d_ops->data_put_ftype(dep, args->filetype); in xfs_dir2_node_addname_int()
1974 tagp = dp->d_ops->data_entry_tag_p(dep); in xfs_dir2_node_addname_int()
1981 xfs_dir2_data_freescan(dp, hdr, &needlog); in xfs_dir2_node_addname_int()
1990 bests = dp->d_ops->free_bests_p(free); /* gcc is so stupid */ in xfs_dir2_node_addname_int()
2029 state->mp = args->dp->i_mount; in xfs_dir2_node_lookup()
2082 state->mp = args->dp->i_mount; in xfs_dir2_node_removename()
2151 state->mp = args->dp->i_mount; in xfs_dir2_node_replace()
2179 ents = args->dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_node_replace()
2197 args->dp->d_ops->data_put_ftype(dep, ftype); in xfs_dir2_node_replace()
2230 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_node_trim_free() local
2236 dp = args->dp; in xfs_dir2_node_trim_free()
2241 error = xfs_dir2_free_try_read(tp, dp, fo, &bp); in xfs_dir2_node_trim_free()
2251 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_node_trim_free()