Lines Matching refs:dp

55 #define	xfs_dir3_leaf_check(dp, bp) \  argument
57 if (!xfs_dir3_leafn_check((dp), (bp))) \
63 struct xfs_inode *dp, in xfs_dir3_leafn_check() argument
69 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir3_leafn_check()
78 return xfs_dir3_leaf_check_int(dp->i_mount, dp, &leafhdr, leaf); in xfs_dir3_leafn_check()
81 #define xfs_dir3_leaf_check(dp, bp) argument
158 struct xfs_inode *dp, in __xfs_dir3_free_read() argument
165 err = xfs_da_read_buf(tp, dp, fbno, mappedbno, bpp, in __xfs_dir3_free_read()
177 struct xfs_inode *dp, in xfs_dir2_free_read() argument
181 return __xfs_dir3_free_read(tp, dp, fbno, -1, bpp); in xfs_dir2_free_read()
187 struct xfs_inode *dp, in xfs_dir2_free_try_read() argument
191 return __xfs_dir3_free_read(tp, dp, fbno, -2, bpp); in xfs_dir2_free_try_read()
201 struct xfs_inode *dp = args->dp; in xfs_dir3_free_get_buf() local
202 struct xfs_mount *mp = dp->i_mount; in xfs_dir3_free_get_buf()
207 error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(args->geo, fbno), in xfs_dir3_free_get_buf()
228 hdr3->hdr.owner = cpu_to_be64(dp->i_ino); in xfs_dir3_free_get_buf()
232 dp->d_ops->free_hdr_to_disk(bp->b_addr, &hdr); in xfs_dir3_free_get_buf()
251 bests = args->dp->d_ops->free_bests_p(free); in xfs_dir2_free_log_bests()
276 args->dp->d_ops->free_hdr_size - 1); in xfs_dir2_free_log_header()
289 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_leaf_to_node() local
306 dp = args->dp; in xfs_dir2_leaf_to_node()
323 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_leaf_to_node()
327 (uint)dp->i_d.di_size / args->geo->blksize); in xfs_dir2_leaf_to_node()
334 to = dp->d_ops->free_bests_p(free); in xfs_dir2_leaf_to_node()
347 dp->d_ops->free_hdr_to_disk(fbp->b_addr, &freehdr); in xfs_dir2_leaf_to_node()
364 xfs_dir3_leaf_check(dp, lbp); in xfs_dir2_leaf_to_node()
379 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_leafn_add() local
391 dp = args->dp; in xfs_dir2_leafn_add()
393 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_add()
394 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_add()
410 if (leafhdr.count == dp->d_ops->leaf_max_ents(args->geo)) { in xfs_dir2_leafn_add()
448 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leafn_add()
451 xfs_dir3_leaf_check(dp, bp); in xfs_dir2_leafn_add()
458 struct xfs_inode *dp, in xfs_dir2_free_hdr_check() argument
464 dp->d_ops->free_hdr_from_disk(&hdr, bp->b_addr); in xfs_dir2_free_hdr_check()
467 dp->d_ops->free_max_bests(dp->i_mount->m_dir_geo)) == 0); in xfs_dir2_free_hdr_check()
472 #define xfs_dir2_free_hdr_check(dp, bp, db) argument
481 struct xfs_inode *dp, in xfs_dir2_leafn_lasthash() argument
489 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lasthash()
499 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_lasthash()
517 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_leafn_lookup_for_addname() local
532 dp = args->dp; in xfs_dir2_leafn_lookup_for_addname()
534 mp = dp->i_mount; in xfs_dir2_leafn_lookup_for_addname()
536 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lookup_for_addname()
537 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_lookup_for_addname()
539 xfs_dir3_leaf_check(dp, bp); in xfs_dir2_leafn_lookup_for_addname()
557 length = dp->d_ops->data_entsize(args->namelen); in xfs_dir2_leafn_lookup_for_addname()
590 newfdb = dp->d_ops->db_to_fdb(args->geo, newdb); in xfs_dir2_leafn_lookup_for_addname()
601 error = xfs_dir2_free_read(tp, dp, in xfs_dir2_leafn_lookup_for_addname()
609 xfs_dir2_free_hdr_check(dp, curbp, curdb); in xfs_dir2_leafn_lookup_for_addname()
614 fi = dp->d_ops->db_to_fdindex(args->geo, curdb); in xfs_dir2_leafn_lookup_for_addname()
618 bests = dp->d_ops->free_bests_p(free); in xfs_dir2_leafn_lookup_for_addname()
672 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_leafn_lookup_for_entry() local
684 dp = args->dp; in xfs_dir2_leafn_lookup_for_entry()
686 mp = dp->i_mount; in xfs_dir2_leafn_lookup_for_entry()
688 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_lookup_for_entry()
689 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_lookup_for_entry()
691 xfs_dir3_leaf_check(dp, bp); in xfs_dir2_leafn_lookup_for_entry()
744 error = xfs_dir3_data_read(tp, dp, in xfs_dir2_leafn_lookup_for_entry()
751 xfs_dir3_data_check(dp, curbp); in xfs_dir2_leafn_lookup_for_entry()
773 args->filetype = dp->d_ops->data_get_ftype(dep); in xfs_dir2_leafn_lookup_for_entry()
912 struct xfs_inode *dp, in xfs_dir2_leafn_order() argument
923 dp->d_ops->leaf_hdr_from_disk(&hdr1, leaf1); in xfs_dir2_leafn_order()
924 dp->d_ops->leaf_hdr_from_disk(&hdr2, leaf2); in xfs_dir2_leafn_order()
925 ents1 = dp->d_ops->leaf_ents_p(leaf1); in xfs_dir2_leafn_order()
926 ents2 = dp->d_ops->leaf_ents_p(leaf2); in xfs_dir2_leafn_order()
964 struct xfs_inode *dp = state->args->dp; in xfs_dir2_leafn_rebalance() local
970 if ((swap = xfs_dir2_leafn_order(dp, blk1->bp, blk2->bp))) { in xfs_dir2_leafn_rebalance()
979 dp->d_ops->leaf_hdr_from_disk(&hdr1, leaf1); in xfs_dir2_leafn_rebalance()
980 dp->d_ops->leaf_hdr_from_disk(&hdr2, leaf2); in xfs_dir2_leafn_rebalance()
981 ents1 = dp->d_ops->leaf_ents_p(leaf1); in xfs_dir2_leafn_rebalance()
982 ents2 = dp->d_ops->leaf_ents_p(leaf2); in xfs_dir2_leafn_rebalance()
1028 dp->d_ops->leaf_hdr_to_disk(leaf1, &hdr1); in xfs_dir2_leafn_rebalance()
1029 dp->d_ops->leaf_hdr_to_disk(leaf2, &hdr2); in xfs_dir2_leafn_rebalance()
1033 xfs_dir3_leaf_check(dp, blk1->bp); in xfs_dir2_leafn_rebalance()
1034 xfs_dir3_leaf_check(dp, blk2->bp); in xfs_dir2_leafn_rebalance()
1058 xfs_alert(dp->i_mount, in xfs_dir2_leafn_rebalance()
1077 struct xfs_inode *dp = args->dp; in xfs_dir3_data_block_free() local
1079 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir3_data_block_free()
1080 bests = dp->d_ops->free_bests_p(free); in xfs_dir3_data_block_free()
1114 dp->d_ops->free_hdr_to_disk(free, &freehdr); in xfs_dir3_data_block_free()
1160 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_leafn_remove() local
1174 dp = args->dp; in xfs_dir2_leafn_remove()
1177 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_remove()
1178 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_remove()
1198 dp->d_ops->leaf_hdr_to_disk(leaf, &leafhdr); in xfs_dir2_leafn_remove()
1211 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_leafn_remove()
1215 dp->d_ops->data_entsize(dep->namelen), &needlog, &needscan); in xfs_dir2_leafn_remove()
1221 xfs_dir2_data_freescan(dp, hdr, &needlog); in xfs_dir2_leafn_remove()
1224 xfs_dir3_data_check(dp, dbp); in xfs_dir2_leafn_remove()
1240 fdb = dp->d_ops->db_to_fdb(args->geo, db); in xfs_dir2_leafn_remove()
1241 error = xfs_dir2_free_read(tp, dp, in xfs_dir2_leafn_remove()
1250 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_leafn_remove()
1251 ASSERT(freehdr.firstdb == dp->d_ops->free_max_bests(args->geo) * in xfs_dir2_leafn_remove()
1259 findex = dp->d_ops->db_to_fdindex(args->geo, db); in xfs_dir2_leafn_remove()
1266 dp->d_ops->data_entry_offset) { in xfs_dir2_leafn_remove()
1293 xfs_dir3_leaf_check(dp, bp); in xfs_dir2_leafn_remove()
1298 *rval = (dp->d_ops->leaf_hdr_size + in xfs_dir2_leafn_remove()
1316 struct xfs_inode *dp; in xfs_dir2_leafn_split() local
1322 dp = args->dp; in xfs_dir2_leafn_split()
1357 oldblk->hashval = xfs_dir2_leafn_lasthash(dp, oldblk->bp, NULL); in xfs_dir2_leafn_split()
1358 newblk->hashval = xfs_dir2_leafn_lasthash(dp, newblk->bp, NULL); in xfs_dir2_leafn_split()
1359 xfs_dir3_leaf_check(dp, oldblk->bp); in xfs_dir2_leafn_split()
1360 xfs_dir3_leaf_check(dp, newblk->bp); in xfs_dir2_leafn_split()
1390 struct xfs_inode *dp = state->args->dp; in xfs_dir2_leafn_toosmall() local
1399 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); in xfs_dir2_leafn_toosmall()
1400 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_toosmall()
1401 xfs_dir3_leaf_check(dp, blk->bp); in xfs_dir2_leafn_toosmall()
1404 bytes = dp->d_ops->leaf_hdr_size + count * sizeof(ents[0]); in xfs_dir2_leafn_toosmall()
1449 error = xfs_dir3_leafn_read(state->args->trans, dp, in xfs_dir2_leafn_toosmall()
1462 dp->d_ops->leaf_hdr_from_disk(&hdr2, leaf); in xfs_dir2_leafn_toosmall()
1463 ents = dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_leafn_toosmall()
1517 struct xfs_inode *dp = state->args->dp; in xfs_dir2_leafn_unbalance() local
1525 dp->d_ops->leaf_hdr_from_disk(&savehdr, save_leaf); in xfs_dir2_leafn_unbalance()
1526 dp->d_ops->leaf_hdr_from_disk(&drophdr, drop_leaf); in xfs_dir2_leafn_unbalance()
1527 sents = dp->d_ops->leaf_ents_p(save_leaf); in xfs_dir2_leafn_unbalance()
1528 dents = dp->d_ops->leaf_ents_p(drop_leaf); in xfs_dir2_leafn_unbalance()
1543 if (xfs_dir2_leafn_order(dp, save_blk->bp, drop_blk->bp)) in xfs_dir2_leafn_unbalance()
1554 dp->d_ops->leaf_hdr_to_disk(save_leaf, &savehdr); in xfs_dir2_leafn_unbalance()
1555 dp->d_ops->leaf_hdr_to_disk(drop_leaf, &drophdr); in xfs_dir2_leafn_unbalance()
1559 xfs_dir3_leaf_check(dp, save_blk->bp); in xfs_dir2_leafn_unbalance()
1560 xfs_dir3_leaf_check(dp, drop_blk->bp); in xfs_dir2_leafn_unbalance()
1582 state->mp = args->dp->i_mount; in xfs_dir2_node_addname()
1646 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_node_addname_int() local
1666 dp = args->dp; in xfs_dir2_node_addname_int()
1667 mp = dp->i_mount; in xfs_dir2_node_addname_int()
1669 length = dp->d_ops->data_entsize(args->namelen); in xfs_dir2_node_addname_int()
1683 bests = dp->d_ops->free_bests_p(free); in xfs_dir2_node_addname_int()
1684 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_node_addname_int()
1721 if ((error = xfs_bmap_last_offset(dp, &fo, XFS_DATA_FORK))) in xfs_dir2_node_addname_int()
1759 error = xfs_dir2_free_try_read(tp, dp, in xfs_dir2_node_addname_int()
1777 bests = dp->d_ops->free_bests_p(free); in xfs_dir2_node_addname_int()
1778 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_node_addname_int()
1829 fbno = dp->d_ops->db_to_fdb(args->geo, dbno); in xfs_dir2_node_addname_int()
1830 error = xfs_dir2_free_try_read(tp, dp, in xfs_dir2_node_addname_int()
1846 if (dp->d_ops->db_to_fdb(args->geo, dbno) != fbno) { in xfs_dir2_node_addname_int()
1850 __func__, (unsigned long long)dp->i_ino, in xfs_dir2_node_addname_int()
1851 (long long)dp->d_ops->db_to_fdb( in xfs_dir2_node_addname_int()
1877 bests = dp->d_ops->free_bests_p(free); in xfs_dir2_node_addname_int()
1878 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_node_addname_int()
1886 dp->d_ops->free_max_bests(args->geo); in xfs_dir2_node_addname_int()
1889 bests = dp->d_ops->free_bests_p(free); in xfs_dir2_node_addname_int()
1890 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_node_addname_int()
1896 findex = dp->d_ops->db_to_fdindex(args->geo, dbno); in xfs_dir2_node_addname_int()
1902 ASSERT(findex < dp->d_ops->free_max_bests(args->geo)); in xfs_dir2_node_addname_int()
1915 dp->d_ops->free_hdr_to_disk(fbp->b_addr, &freehdr); in xfs_dir2_node_addname_int()
1924 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_node_addname_int()
1941 error = xfs_dir3_data_read(tp, dp, in xfs_dir2_node_addname_int()
1947 bf = dp->d_ops->data_bestfree_p(hdr); in xfs_dir2_node_addname_int()
1970 dp->d_ops->data_put_ftype(dep, args->filetype); in xfs_dir2_node_addname_int()
1971 tagp = dp->d_ops->data_entry_tag_p(dep); in xfs_dir2_node_addname_int()
1978 xfs_dir2_data_freescan(dp, hdr, &needlog); in xfs_dir2_node_addname_int()
1987 bests = dp->d_ops->free_bests_p(free); /* gcc is so stupid */ in xfs_dir2_node_addname_int()
2026 state->mp = args->dp->i_mount; in xfs_dir2_node_lookup()
2079 state->mp = args->dp->i_mount; in xfs_dir2_node_removename()
2148 state->mp = args->dp->i_mount; in xfs_dir2_node_replace()
2176 ents = args->dp->d_ops->leaf_ents_p(leaf); in xfs_dir2_node_replace()
2194 args->dp->d_ops->data_put_ftype(dep, ftype); in xfs_dir2_node_replace()
2227 xfs_inode_t *dp; /* incore directory inode */ in xfs_dir2_node_trim_free() local
2233 dp = args->dp; in xfs_dir2_node_trim_free()
2238 error = xfs_dir2_free_try_read(tp, dp, fo, &bp); in xfs_dir2_node_trim_free()
2248 dp->d_ops->free_hdr_from_disk(&freehdr, free); in xfs_dir2_node_trim_free()