Lines Matching refs:mp
25 struct xfs_mount *mp) in xfs_log_calc_max_attrsetm_res() argument
30 size = xfs_attr_leaf_entsize_local_max(mp->m_attr_geo->blksize) - in xfs_log_calc_max_attrsetm_res()
32 nblks = XFS_DAENTER_SPACE_RES(mp, XFS_ATTR_FORK); in xfs_log_calc_max_attrsetm_res()
33 nblks += XFS_B_TO_FSB(mp, size); in xfs_log_calc_max_attrsetm_res()
34 nblks += XFS_NEXTENTADD_SPACE_RES(mp, size, XFS_ATTR_FORK); in xfs_log_calc_max_attrsetm_res()
36 return M_RES(mp)->tr_attrsetm.tr_logres + in xfs_log_calc_max_attrsetm_res()
37 M_RES(mp)->tr_attrsetrt.tr_logres * nblks; in xfs_log_calc_max_attrsetm_res()
46 struct xfs_mount *mp, in xfs_log_calc_trans_resv_for_minlogblocks() argument
49 unsigned int rmap_maxlevels = mp->m_rmap_maxlevels; in xfs_log_calc_trans_resv_for_minlogblocks()
59 if (xfs_has_rmapbt(mp) && xfs_has_reflink(mp)) in xfs_log_calc_trans_resv_for_minlogblocks()
60 mp->m_rmap_maxlevels = XFS_OLD_REFLINK_RMAP_MAXLEVELS; in xfs_log_calc_trans_resv_for_minlogblocks()
62 xfs_trans_resv_calc(mp, resv); in xfs_log_calc_trans_resv_for_minlogblocks()
64 if (xfs_has_reflink(mp)) { in xfs_log_calc_trans_resv_for_minlogblocks()
73 } else if (xfs_has_rmapbt(mp)) { in xfs_log_calc_trans_resv_for_minlogblocks()
89 xfs_calc_write_reservation_minlogsize(mp); in xfs_log_calc_trans_resv_for_minlogblocks()
91 xfs_calc_itruncate_reservation_minlogsize(mp); in xfs_log_calc_trans_resv_for_minlogblocks()
93 xfs_calc_qm_dqalloc_reservation_minlogsize(mp); in xfs_log_calc_trans_resv_for_minlogblocks()
96 mp->m_rmap_maxlevels = rmap_maxlevels; in xfs_log_calc_trans_resv_for_minlogblocks()
106 struct xfs_mount *mp, in xfs_log_get_max_trans_res() argument
116 attr_space = xfs_log_calc_max_attrsetm_res(mp); in xfs_log_get_max_trans_res()
118 xfs_log_calc_trans_resv_for_minlogblocks(mp, &resv); in xfs_log_get_max_trans_res()
127 trace_xfs_trans_resv_calc_minlogsize(mp, i, resp); in xfs_log_get_max_trans_res()
138 trace_xfs_log_get_max_trans_res(mp, max_resp); in xfs_log_get_max_trans_res()
149 struct xfs_mount *mp) in xfs_log_calc_minimum_size() argument
156 xfs_log_get_max_trans_res(mp, &tres); in xfs_log_calc_minimum_size()
158 max_logres = xfs_log_calc_unit_res(mp, tres.tr_logres); in xfs_log_calc_minimum_size()
162 if (xfs_has_logv2(mp) && mp->m_sb.sb_logsunit > 1) in xfs_log_calc_minimum_size()
163 lsunit = BTOBB(mp->m_sb.sb_logsunit); in xfs_log_calc_minimum_size()
200 return XFS_BB_TO_FSB(mp, min_logblks); in xfs_log_calc_minimum_size()