Lines Matching refs:mp

195 	struct xfs_mount	*mp,  in xfs_validate_sb_read()  argument
206 xfs_warn(mp, in xfs_validate_sb_read()
209 xfs_warn(mp, in xfs_validate_sb_read()
214 xfs_alert(mp, in xfs_validate_sb_read()
218 if (!xfs_is_readonly(mp)) { in xfs_validate_sb_read()
219 xfs_warn(mp, in xfs_validate_sb_read()
221 xfs_warn(mp, in xfs_validate_sb_read()
228 xfs_warn(mp, in xfs_validate_sb_read()
232 xfs_warn(mp, in xfs_validate_sb_read()
310 struct xfs_mount *mp, in xfs_validate_sb_write() argument
326 !xfs_verify_icount(mp, sbp->sb_icount) || in xfs_validate_sb_write()
328 xfs_warn(mp, "SB summary counter sanity check failed"); in xfs_validate_sb_write()
340 if (!xfs_is_readonly(mp) && in xfs_validate_sb_write()
342 xfs_alert(mp, in xfs_validate_sb_write()
349 xfs_warn(mp, in xfs_validate_sb_write()
357 xfs_warn(mp, in xfs_validate_sb_write()
369 if (!xfs_log_check_lsn(mp, sbp->sb_lsn)) in xfs_validate_sb_write()
387 struct xfs_mount *mp, in xfs_validate_sb_rtgroups() argument
394 xfs_warn(mp, in xfs_validate_sb_rtgroups()
400 xfs_warn(mp, in xfs_validate_sb_rtgroups()
408 xfs_warn(mp, in xfs_validate_sb_rtgroups()
415 xfs_warn(mp, in xfs_validate_sb_rtgroups()
423 xfs_warn(mp, in xfs_validate_sb_rtgroups()
431 xfs_warn(mp, in xfs_validate_sb_rtgroups()
438 xfs_warn(mp, in xfs_validate_sb_rtgroups()
449 struct xfs_mount *mp, in xfs_validate_sb_zoned() argument
453 xfs_warn(mp, in xfs_validate_sb_zoned()
459 xfs_warn(mp, in xfs_validate_sb_zoned()
466 xfs_warn(mp, in xfs_validate_sb_zoned()
478 struct xfs_mount *mp, in xfs_validate_sb_common() argument
489 xfs_warn(mp, in xfs_validate_sb_common()
496 xfs_warn(mp, in xfs_validate_sb_common()
506 xfs_notice(mp, in xfs_validate_sb_common()
514 xfs_notice(mp, in xfs_validate_sb_common()
530 xfs_warn(mp, in xfs_validate_sb_common()
539 xfs_warn(mp, in xfs_validate_sb_common()
546 xfs_warn(mp, in xfs_validate_sb_common()
554 xfs_warn(mp, in xfs_validate_sb_common()
559 error = xfs_validate_sb_rtgroups(mp, sbp); in xfs_validate_sb_common()
564 error = xfs_validate_sb_zoned(mp, sbp); in xfs_validate_sb_common()
570 xfs_notice(mp, in xfs_validate_sb_common()
576 sbp->sb_logstart == 0 && mp->m_logdev_targp == mp->m_ddev_targp)) { in xfs_validate_sb_common()
577 xfs_warn(mp, in xfs_validate_sb_common()
584 sbp->sb_logstart != 0 && mp->m_logdev_targp != mp->m_ddev_targp)) { in xfs_validate_sb_common()
585 xfs_warn(mp, in xfs_validate_sb_common()
621 XFS_FSB_TO_B(mp, sbp->sb_agblocks) < XFS_MIN_AG_BYTES || in xfs_validate_sb_common()
622 XFS_FSB_TO_B(mp, sbp->sb_agblocks) > XFS_MAX_AG_BYTES || in xfs_validate_sb_common()
633 xfs_notice(mp, "SB sanity check failed"); in xfs_validate_sb_common()
644 xfs_notice(mp, in xfs_validate_sb_common()
650 if (XFS_FSB_TO_B(mp, sbp->sb_logblocks) > XFS_MAX_LOG_BYTES) { in xfs_validate_sb_common()
651 xfs_warn(mp, in xfs_validate_sb_common()
653 XFS_FSB_TO_B(mp, sbp->sb_logblocks), in xfs_validate_sb_common()
665 xfs_notice(mp, in xfs_validate_sb_common()
671 xfs_notice(mp, in xfs_validate_sb_common()
679 xfs_notice(mp, in xfs_validate_sb_common()
685 xfs_notice(mp, in xfs_validate_sb_common()
693 xfs_notice(mp, in xfs_validate_sb_common()
705 xfs_notice(mp, "SB stripe alignment sanity check failed"); in xfs_validate_sb_common()
709 if (!xfs_validate_stripe_geometry(mp, XFS_FSB_TO_B(mp, sbp->sb_unit), in xfs_validate_sb_common()
710 XFS_FSB_TO_B(mp, sbp->sb_width), 0, in xfs_validate_sb_common()
724 xfs_warn(mp, "inode size of %d bytes not supported", in xfs_validate_sb_common()
1078 struct xfs_mount *mp = bp->b_mount; in xfs_sb_read_verify() local
1094 xfs_has_crc(mp)) { in xfs_sb_read_verify()
1106 error = xfs_validate_sb_common(mp, bp, &sb); in xfs_sb_read_verify()
1109 error = xfs_validate_sb_read(mp, &sb); in xfs_sb_read_verify()
1144 struct xfs_mount *mp = bp->b_mount; in xfs_sb_write_verify() local
1154 error = xfs_validate_sb_common(mp, bp, &sb); in xfs_sb_write_verify()
1157 error = xfs_validate_sb_write(mp, bp, &sb); in xfs_sb_write_verify()
1191 struct xfs_mount *mp, in xfs_sb_mount_rextsize() argument
1194 struct xfs_groups *rgs = &mp->m_groups[XG_TYPE_RTG]; in xfs_sb_mount_rextsize()
1196 mp->m_rtxblklog = log2_if_power2(sbp->sb_rextsize); in xfs_sb_mount_rextsize()
1197 mp->m_rtxblkmask = mask64_if_power2(sbp->sb_rextsize); in xfs_sb_mount_rextsize()
1202 rgs->blklog = mp->m_sb.sb_rgblklog; in xfs_sb_mount_rextsize()
1203 rgs->blkmask = xfs_mask32lo(mp->m_sb.sb_rgblklog); in xfs_sb_mount_rextsize()
1204 rgs->start_fsb = mp->m_sb.sb_rtstart; in xfs_sb_mount_rextsize()
1218 struct xfs_mount *mp, in xfs_mount_sb_set_rextsize() argument
1228 xfs_sb_mount_rextsize(mp, sbp); in xfs_mount_sb_set_rextsize()
1242 struct xfs_mount *mp, in xfs_sb_mount_common() argument
1245 struct xfs_groups *ags = &mp->m_groups[XG_TYPE_AG]; in xfs_sb_mount_common()
1247 mp->m_agfrotor = 0; in xfs_sb_mount_common()
1248 atomic_set(&mp->m_agirotor, 0); in xfs_sb_mount_common()
1249 mp->m_maxagi = mp->m_sb.sb_agcount; in xfs_sb_mount_common()
1250 mp->m_blkbit_log = sbp->sb_blocklog + XFS_NBBYLOG; in xfs_sb_mount_common()
1251 mp->m_blkbb_log = sbp->sb_blocklog - BBSHIFT; in xfs_sb_mount_common()
1252 mp->m_sectbb_log = sbp->sb_sectlog - BBSHIFT; in xfs_sb_mount_common()
1253 mp->m_agno_log = xfs_highbit32(sbp->sb_agcount - 1) + 1; in xfs_sb_mount_common()
1254 mp->m_blockmask = sbp->sb_blocksize - 1; in xfs_sb_mount_common()
1255 mp->m_blockwsize = xfs_rtbmblock_size(sbp) >> XFS_WORDLOG; in xfs_sb_mount_common()
1256 mp->m_rtx_per_rbmblock = mp->m_blockwsize << XFS_NBWORDLOG; in xfs_sb_mount_common()
1258 ags->blocks = mp->m_sb.sb_agblocks; in xfs_sb_mount_common()
1259 ags->blklog = mp->m_sb.sb_agblklog; in xfs_sb_mount_common()
1260 ags->blkmask = xfs_mask32lo(mp->m_sb.sb_agblklog); in xfs_sb_mount_common()
1262 xfs_sb_mount_rextsize(mp, sbp); in xfs_sb_mount_common()
1264 mp->m_alloc_mxr[0] = xfs_allocbt_maxrecs(mp, sbp->sb_blocksize, true); in xfs_sb_mount_common()
1265 mp->m_alloc_mxr[1] = xfs_allocbt_maxrecs(mp, sbp->sb_blocksize, false); in xfs_sb_mount_common()
1266 mp->m_alloc_mnr[0] = mp->m_alloc_mxr[0] / 2; in xfs_sb_mount_common()
1267 mp->m_alloc_mnr[1] = mp->m_alloc_mxr[1] / 2; in xfs_sb_mount_common()
1269 mp->m_bmap_dmxr[0] = xfs_bmbt_maxrecs(mp, sbp->sb_blocksize, true); in xfs_sb_mount_common()
1270 mp->m_bmap_dmxr[1] = xfs_bmbt_maxrecs(mp, sbp->sb_blocksize, false); in xfs_sb_mount_common()
1271 mp->m_bmap_dmnr[0] = mp->m_bmap_dmxr[0] / 2; in xfs_sb_mount_common()
1272 mp->m_bmap_dmnr[1] = mp->m_bmap_dmxr[1] / 2; in xfs_sb_mount_common()
1274 mp->m_rmap_mxr[0] = xfs_rmapbt_maxrecs(mp, sbp->sb_blocksize, true); in xfs_sb_mount_common()
1275 mp->m_rmap_mxr[1] = xfs_rmapbt_maxrecs(mp, sbp->sb_blocksize, false); in xfs_sb_mount_common()
1276 mp->m_rmap_mnr[0] = mp->m_rmap_mxr[0] / 2; in xfs_sb_mount_common()
1277 mp->m_rmap_mnr[1] = mp->m_rmap_mxr[1] / 2; in xfs_sb_mount_common()
1279 mp->m_rtrmap_mxr[0] = xfs_rtrmapbt_maxrecs(mp, sbp->sb_blocksize, true); in xfs_sb_mount_common()
1280 mp->m_rtrmap_mxr[1] = xfs_rtrmapbt_maxrecs(mp, sbp->sb_blocksize, false); in xfs_sb_mount_common()
1281 mp->m_rtrmap_mnr[0] = mp->m_rtrmap_mxr[0] / 2; in xfs_sb_mount_common()
1282 mp->m_rtrmap_mnr[1] = mp->m_rtrmap_mxr[1] / 2; in xfs_sb_mount_common()
1284 mp->m_refc_mxr[0] = xfs_refcountbt_maxrecs(mp, sbp->sb_blocksize, true); in xfs_sb_mount_common()
1285 mp->m_refc_mxr[1] = xfs_refcountbt_maxrecs(mp, sbp->sb_blocksize, false); in xfs_sb_mount_common()
1286 mp->m_refc_mnr[0] = mp->m_refc_mxr[0] / 2; in xfs_sb_mount_common()
1287 mp->m_refc_mnr[1] = mp->m_refc_mxr[1] / 2; in xfs_sb_mount_common()
1289 mp->m_rtrefc_mxr[0] = xfs_rtrefcountbt_maxrecs(mp, sbp->sb_blocksize, in xfs_sb_mount_common()
1291 mp->m_rtrefc_mxr[1] = xfs_rtrefcountbt_maxrecs(mp, sbp->sb_blocksize, in xfs_sb_mount_common()
1293 mp->m_rtrefc_mnr[0] = mp->m_rtrefc_mxr[0] / 2; in xfs_sb_mount_common()
1294 mp->m_rtrefc_mnr[1] = mp->m_rtrefc_mxr[1] / 2; in xfs_sb_mount_common()
1296 mp->m_bsize = XFS_FSB_TO_BB(mp, 1); in xfs_sb_mount_common()
1297 mp->m_alloc_set_aside = xfs_alloc_set_aside(mp); in xfs_sb_mount_common()
1298 mp->m_ag_max_usable = xfs_alloc_ag_max_usable(mp); in xfs_sb_mount_common()
1311 struct xfs_mount *mp = tp->t_mountp; in xfs_log_sb() local
1322 if (xfs_has_lazysbcount(mp)) { in xfs_log_sb()
1323 mp->m_sb.sb_icount = percpu_counter_sum_positive(&mp->m_icount); in xfs_log_sb()
1324 mp->m_sb.sb_ifree = min_t(uint64_t, in xfs_log_sb()
1325 percpu_counter_sum_positive(&mp->m_ifree), in xfs_log_sb()
1326 mp->m_sb.sb_icount); in xfs_log_sb()
1327 mp->m_sb.sb_fdblocks = xfs_sum_freecounter(mp, XC_FREE_BLOCKS); in xfs_log_sb()
1336 if (xfs_has_rtgroups(mp) && !xfs_has_zoned(mp)) { in xfs_log_sb()
1337 mp->m_sb.sb_frextents = in xfs_log_sb()
1338 xfs_sum_freecounter(mp, XC_FREE_RTEXTENTS); in xfs_log_sb()
1341 xfs_sb_to_disk(bp->b_addr, &mp->m_sb); in xfs_log_sb()
1359 struct xfs_mount *mp, in xfs_sync_sb() argument
1365 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_sb, 0, 0, in xfs_sync_sb()
1388 struct xfs_mount *mp) in xfs_update_secondary_sbs() argument
1396 while ((pag = xfs_perag_next_from(mp, pag, 1))) { in xfs_update_secondary_sbs()
1399 error = xfs_buf_get(mp->m_ddev_targp, in xfs_update_secondary_sbs()
1400 XFS_AG_DADDR(mp, pag_agno(pag), XFS_SB_DADDR), in xfs_update_secondary_sbs()
1401 XFS_FSS_TO_BB(mp, 1), &bp); in xfs_update_secondary_sbs()
1410 xfs_warn(mp, in xfs_update_secondary_sbs()
1421 xfs_sb_to_disk(bp->b_addr, &mp->m_sb); in xfs_update_secondary_sbs()
1431 xfs_warn(mp, in xfs_update_secondary_sbs()
1441 xfs_warn(mp, "error %d writing secondary superblocks", error); in xfs_update_secondary_sbs()
1451 struct xfs_mount *mp, in xfs_sync_sb_buf() argument
1459 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_sb, 0, 0, 0, &tp); in xfs_sync_sb_buf()
1490 struct xfs_mount *mp, in xfs_fs_geometry() argument
1494 struct xfs_sb *sbp = &mp->m_sb; in xfs_fs_geometry()
1527 if (xfs_has_attr(mp)) in xfs_fs_geometry()
1529 if (xfs_has_quota(mp)) in xfs_fs_geometry()
1531 if (xfs_has_align(mp)) in xfs_fs_geometry()
1533 if (xfs_has_dalign(mp)) in xfs_fs_geometry()
1535 if (xfs_has_asciici(mp)) in xfs_fs_geometry()
1537 if (xfs_has_lazysbcount(mp)) in xfs_fs_geometry()
1539 if (xfs_has_projid32(mp)) in xfs_fs_geometry()
1541 if (xfs_has_crc(mp)) in xfs_fs_geometry()
1543 if (xfs_has_ftype(mp)) in xfs_fs_geometry()
1545 if (xfs_has_finobt(mp)) in xfs_fs_geometry()
1547 if (xfs_has_sparseinodes(mp)) in xfs_fs_geometry()
1549 if (xfs_has_rmapbt(mp)) in xfs_fs_geometry()
1551 if (xfs_has_reflink(mp)) in xfs_fs_geometry()
1553 if (xfs_has_bigtime(mp)) in xfs_fs_geometry()
1555 if (xfs_has_inobtcounts(mp)) in xfs_fs_geometry()
1557 if (xfs_has_parent(mp)) in xfs_fs_geometry()
1559 if (xfs_has_sector(mp)) { in xfs_fs_geometry()
1565 if (xfs_has_large_extent_counts(mp)) in xfs_fs_geometry()
1567 if (xfs_has_exchange_range(mp)) in xfs_fs_geometry()
1569 if (xfs_has_metadir(mp)) in xfs_fs_geometry()
1571 if (xfs_has_zoned(mp)) in xfs_fs_geometry()
1579 if (xfs_has_logv2(mp)) in xfs_fs_geometry()
1589 if (xfs_has_rtgroups(mp)) { in xfs_fs_geometry()
1593 if (xfs_has_zoned(mp)) { in xfs_fs_geometry()
1602 struct xfs_mount *mp, in xfs_sb_read_secondary() argument
1611 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, in xfs_sb_read_secondary()
1612 XFS_AG_DADDR(mp, agno, XFS_SB_BLOCK(mp)), in xfs_sb_read_secondary()
1613 XFS_FSS_TO_BB(mp, 1), 0, &bp, &xfs_sb_buf_ops); in xfs_sb_read_secondary()
1615 xfs_agno_mark_sick(mp, agno, XFS_SICK_AG_SB); in xfs_sb_read_secondary()
1626 struct xfs_mount *mp, in xfs_sb_get_secondary() argument
1635 error = xfs_trans_get_buf(tp, mp->m_ddev_targp, in xfs_sb_get_secondary()
1636 XFS_AG_DADDR(mp, agno, XFS_SB_BLOCK(mp)), in xfs_sb_get_secondary()
1637 XFS_FSS_TO_BB(mp, 1), 0, &bp); in xfs_sb_get_secondary()
1654 struct xfs_mount *mp, in xfs_validate_stripe_geometry() argument
1663 xfs_notice(mp, in xfs_validate_stripe_geometry()
1670 xfs_notice(mp, in xfs_validate_stripe_geometry()
1677 xfs_notice(mp, in xfs_validate_stripe_geometry()
1685 xfs_notice(mp, in xfs_validate_stripe_geometry()
1692 xfs_notice(mp, in xfs_validate_stripe_geometry()
1699 xfs_notice(mp, in xfs_validate_stripe_geometry()
1716 if (!mp->m_dalign) in xfs_validate_stripe_geometry()
1719 xfs_notice(mp, in xfs_validate_stripe_geometry()
1721 BBTOB(mp->m_dalign), BBTOB(mp->m_swidth)); in xfs_validate_stripe_geometry()