Lines Matching full: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()
301 struct xfs_mount *mp, in xfs_validate_sb_write() argument
317 !xfs_verify_icount(mp, sbp->sb_icount) || in xfs_validate_sb_write()
319 xfs_warn(mp, "SB summary counter sanity check failed"); in xfs_validate_sb_write()
331 if (!xfs_is_readonly(mp) && in xfs_validate_sb_write()
333 xfs_alert(mp, in xfs_validate_sb_write()
340 xfs_warn(mp, in xfs_validate_sb_write()
348 xfs_warn(mp, in xfs_validate_sb_write()
360 if (!xfs_log_check_lsn(mp, sbp->sb_lsn)) in xfs_validate_sb_write()
378 struct xfs_mount *mp, in xfs_validate_sb_rtgroups() argument
385 xfs_warn(mp, in xfs_validate_sb_rtgroups()
391 xfs_warn(mp, in xfs_validate_sb_rtgroups()
399 xfs_warn(mp, in xfs_validate_sb_rtgroups()
406 xfs_warn(mp, in xfs_validate_sb_rtgroups()
414 xfs_warn(mp, in xfs_validate_sb_rtgroups()
422 xfs_warn(mp, in xfs_validate_sb_rtgroups()
429 xfs_warn(mp, in xfs_validate_sb_rtgroups()
441 struct xfs_mount *mp, in xfs_validate_sb_common() argument
452 xfs_warn(mp, in xfs_validate_sb_common()
459 xfs_warn(mp, in xfs_validate_sb_common()
469 xfs_notice(mp, in xfs_validate_sb_common()
477 xfs_notice(mp, in xfs_validate_sb_common()
493 xfs_warn(mp, in xfs_validate_sb_common()
502 xfs_warn(mp, in xfs_validate_sb_common()
509 xfs_warn(mp, in xfs_validate_sb_common()
517 xfs_warn(mp, in xfs_validate_sb_common()
522 error = xfs_validate_sb_rtgroups(mp, sbp); in xfs_validate_sb_common()
528 xfs_notice(mp, in xfs_validate_sb_common()
534 sbp->sb_logstart == 0 && mp->m_logdev_targp == mp->m_ddev_targp)) { in xfs_validate_sb_common()
535 xfs_warn(mp, in xfs_validate_sb_common()
542 sbp->sb_logstart != 0 && mp->m_logdev_targp != mp->m_ddev_targp)) { in xfs_validate_sb_common()
543 xfs_warn(mp, in xfs_validate_sb_common()
579 XFS_FSB_TO_B(mp, sbp->sb_agblocks) < XFS_MIN_AG_BYTES || in xfs_validate_sb_common()
580 XFS_FSB_TO_B(mp, sbp->sb_agblocks) > XFS_MAX_AG_BYTES || in xfs_validate_sb_common()
591 xfs_notice(mp, "SB sanity check failed"); in xfs_validate_sb_common()
602 xfs_notice(mp, in xfs_validate_sb_common()
608 if (XFS_FSB_TO_B(mp, sbp->sb_logblocks) > XFS_MAX_LOG_BYTES) { in xfs_validate_sb_common()
609 xfs_warn(mp, in xfs_validate_sb_common()
611 XFS_FSB_TO_B(mp, sbp->sb_logblocks), in xfs_validate_sb_common()
623 xfs_notice(mp, in xfs_validate_sb_common()
629 xfs_notice(mp, in xfs_validate_sb_common()
637 xfs_notice(mp, in xfs_validate_sb_common()
643 xfs_notice(mp, in xfs_validate_sb_common()
651 xfs_notice(mp, in xfs_validate_sb_common()
663 xfs_notice(mp, "SB stripe alignment sanity check failed"); in xfs_validate_sb_common()
667 if (!xfs_validate_stripe_geometry(mp, XFS_FSB_TO_B(mp, sbp->sb_unit), in xfs_validate_sb_common()
668 XFS_FSB_TO_B(mp, sbp->sb_width), 0, in xfs_validate_sb_common()
682 xfs_warn(mp, "inode size of %d bytes not supported", in xfs_validate_sb_common()
1023 struct xfs_mount *mp = bp->b_mount; in xfs_sb_read_verify() local
1039 xfs_has_crc(mp)) { in xfs_sb_read_verify()
1051 error = xfs_validate_sb_common(mp, bp, &sb); in xfs_sb_read_verify()
1054 error = xfs_validate_sb_read(mp, &sb); in xfs_sb_read_verify()
1089 struct xfs_mount *mp = bp->b_mount; in xfs_sb_write_verify() local
1099 error = xfs_validate_sb_common(mp, bp, &sb); in xfs_sb_write_verify()
1102 error = xfs_validate_sb_write(mp, bp, &sb); in xfs_sb_write_verify()
1136 struct xfs_mount *mp, in xfs_sb_mount_rextsize() argument
1139 struct xfs_groups *rgs = &mp->m_groups[XG_TYPE_RTG]; in xfs_sb_mount_rextsize()
1141 mp->m_rtxblklog = log2_if_power2(sbp->sb_rextsize); in xfs_sb_mount_rextsize()
1142 mp->m_rtxblkmask = mask64_if_power2(sbp->sb_rextsize); in xfs_sb_mount_rextsize()
1147 rgs->blklog = mp->m_sb.sb_rgblklog; in xfs_sb_mount_rextsize()
1148 rgs->blkmask = xfs_mask32lo(mp->m_sb.sb_rgblklog); in xfs_sb_mount_rextsize()
1159 struct xfs_mount *mp, in xfs_mount_sb_set_rextsize() argument
1169 xfs_sb_mount_rextsize(mp, sbp); in xfs_mount_sb_set_rextsize()
1183 struct xfs_mount *mp, in xfs_sb_mount_common() argument
1186 struct xfs_groups *ags = &mp->m_groups[XG_TYPE_AG]; in xfs_sb_mount_common()
1188 mp->m_agfrotor = 0; in xfs_sb_mount_common()
1189 atomic_set(&mp->m_agirotor, 0); in xfs_sb_mount_common()
1190 mp->m_maxagi = mp->m_sb.sb_agcount; in xfs_sb_mount_common()
1191 mp->m_blkbit_log = sbp->sb_blocklog + XFS_NBBYLOG; in xfs_sb_mount_common()
1192 mp->m_blkbb_log = sbp->sb_blocklog - BBSHIFT; in xfs_sb_mount_common()
1193 mp->m_sectbb_log = sbp->sb_sectlog - BBSHIFT; in xfs_sb_mount_common()
1194 mp->m_agno_log = xfs_highbit32(sbp->sb_agcount - 1) + 1; in xfs_sb_mount_common()
1195 mp->m_blockmask = sbp->sb_blocksize - 1; in xfs_sb_mount_common()
1196 mp->m_blockwsize = xfs_rtbmblock_size(sbp) >> XFS_WORDLOG; in xfs_sb_mount_common()
1197 mp->m_rtx_per_rbmblock = mp->m_blockwsize << XFS_NBWORDLOG; in xfs_sb_mount_common()
1199 ags->blocks = mp->m_sb.sb_agblocks; in xfs_sb_mount_common()
1200 ags->blklog = mp->m_sb.sb_agblklog; in xfs_sb_mount_common()
1201 ags->blkmask = xfs_mask32lo(mp->m_sb.sb_agblklog); in xfs_sb_mount_common()
1203 xfs_sb_mount_rextsize(mp, sbp); in xfs_sb_mount_common()
1205 mp->m_alloc_mxr[0] = xfs_allocbt_maxrecs(mp, sbp->sb_blocksize, true); in xfs_sb_mount_common()
1206 mp->m_alloc_mxr[1] = xfs_allocbt_maxrecs(mp, sbp->sb_blocksize, false); in xfs_sb_mount_common()
1207 mp->m_alloc_mnr[0] = mp->m_alloc_mxr[0] / 2; in xfs_sb_mount_common()
1208 mp->m_alloc_mnr[1] = mp->m_alloc_mxr[1] / 2; in xfs_sb_mount_common()
1210 mp->m_bmap_dmxr[0] = xfs_bmbt_maxrecs(mp, sbp->sb_blocksize, true); in xfs_sb_mount_common()
1211 mp->m_bmap_dmxr[1] = xfs_bmbt_maxrecs(mp, sbp->sb_blocksize, false); in xfs_sb_mount_common()
1212 mp->m_bmap_dmnr[0] = mp->m_bmap_dmxr[0] / 2; in xfs_sb_mount_common()
1213 mp->m_bmap_dmnr[1] = mp->m_bmap_dmxr[1] / 2; in xfs_sb_mount_common()
1215 mp->m_rmap_mxr[0] = xfs_rmapbt_maxrecs(mp, sbp->sb_blocksize, true); in xfs_sb_mount_common()
1216 mp->m_rmap_mxr[1] = xfs_rmapbt_maxrecs(mp, sbp->sb_blocksize, false); in xfs_sb_mount_common()
1217 mp->m_rmap_mnr[0] = mp->m_rmap_mxr[0] / 2; in xfs_sb_mount_common()
1218 mp->m_rmap_mnr[1] = mp->m_rmap_mxr[1] / 2; in xfs_sb_mount_common()
1220 mp->m_rtrmap_mxr[0] = xfs_rtrmapbt_maxrecs(mp, sbp->sb_blocksize, true); in xfs_sb_mount_common()
1221 mp->m_rtrmap_mxr[1] = xfs_rtrmapbt_maxrecs(mp, sbp->sb_blocksize, false); in xfs_sb_mount_common()
1222 mp->m_rtrmap_mnr[0] = mp->m_rtrmap_mxr[0] / 2; in xfs_sb_mount_common()
1223 mp->m_rtrmap_mnr[1] = mp->m_rtrmap_mxr[1] / 2; in xfs_sb_mount_common()
1225 mp->m_refc_mxr[0] = xfs_refcountbt_maxrecs(mp, sbp->sb_blocksize, true); in xfs_sb_mount_common()
1226 mp->m_refc_mxr[1] = xfs_refcountbt_maxrecs(mp, sbp->sb_blocksize, false); in xfs_sb_mount_common()
1227 mp->m_refc_mnr[0] = mp->m_refc_mxr[0] / 2; in xfs_sb_mount_common()
1228 mp->m_refc_mnr[1] = mp->m_refc_mxr[1] / 2; in xfs_sb_mount_common()
1230 mp->m_rtrefc_mxr[0] = xfs_rtrefcountbt_maxrecs(mp, sbp->sb_blocksize, in xfs_sb_mount_common()
1232 mp->m_rtrefc_mxr[1] = xfs_rtrefcountbt_maxrecs(mp, sbp->sb_blocksize, in xfs_sb_mount_common()
1234 mp->m_rtrefc_mnr[0] = mp->m_rtrefc_mxr[0] / 2; in xfs_sb_mount_common()
1235 mp->m_rtrefc_mnr[1] = mp->m_rtrefc_mxr[1] / 2; in xfs_sb_mount_common()
1237 mp->m_bsize = XFS_FSB_TO_BB(mp, 1); in xfs_sb_mount_common()
1238 mp->m_alloc_set_aside = xfs_alloc_set_aside(mp); in xfs_sb_mount_common()
1239 mp->m_ag_max_usable = xfs_alloc_ag_max_usable(mp); in xfs_sb_mount_common()
1252 struct xfs_mount *mp = tp->t_mountp; in xfs_log_sb() local
1263 if (xfs_has_lazysbcount(mp)) { in xfs_log_sb()
1264 mp->m_sb.sb_icount = percpu_counter_sum_positive(&mp->m_icount); in xfs_log_sb()
1265 mp->m_sb.sb_ifree = min_t(uint64_t, in xfs_log_sb()
1266 percpu_counter_sum_positive(&mp->m_ifree), in xfs_log_sb()
1267 mp->m_sb.sb_icount); in xfs_log_sb()
1268 mp->m_sb.sb_fdblocks = in xfs_log_sb()
1269 percpu_counter_sum_positive(&mp->m_fdblocks); in xfs_log_sb()
1278 if (xfs_has_rtgroups(mp)) in xfs_log_sb()
1279 mp->m_sb.sb_frextents = in xfs_log_sb()
1280 percpu_counter_sum_positive(&mp->m_frextents); in xfs_log_sb()
1282 xfs_sb_to_disk(bp->b_addr, &mp->m_sb); in xfs_log_sb()
1300 struct xfs_mount *mp, in xfs_sync_sb() argument
1306 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_sb, 0, 0, in xfs_sync_sb()
1329 struct xfs_mount *mp) in xfs_update_secondary_sbs() argument
1337 while ((pag = xfs_perag_next_from(mp, pag, 1))) { in xfs_update_secondary_sbs()
1340 error = xfs_buf_get(mp->m_ddev_targp, in xfs_update_secondary_sbs()
1341 XFS_AG_DADDR(mp, pag_agno(pag), XFS_SB_DADDR), in xfs_update_secondary_sbs()
1342 XFS_FSS_TO_BB(mp, 1), &bp); in xfs_update_secondary_sbs()
1351 xfs_warn(mp, in xfs_update_secondary_sbs()
1362 xfs_sb_to_disk(bp->b_addr, &mp->m_sb); in xfs_update_secondary_sbs()
1372 xfs_warn(mp, in xfs_update_secondary_sbs()
1382 xfs_warn(mp, "error %d writing secondary superblocks", error); in xfs_update_secondary_sbs()
1392 struct xfs_mount *mp, in xfs_sync_sb_buf() argument
1400 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_sb, 0, 0, 0, &tp); in xfs_sync_sb_buf()
1431 struct xfs_mount *mp, in xfs_fs_geometry() argument
1435 struct xfs_sb *sbp = &mp->m_sb; in xfs_fs_geometry()
1467 if (xfs_has_attr(mp)) in xfs_fs_geometry()
1469 if (xfs_has_quota(mp)) in xfs_fs_geometry()
1471 if (xfs_has_align(mp)) in xfs_fs_geometry()
1473 if (xfs_has_dalign(mp)) in xfs_fs_geometry()
1475 if (xfs_has_asciici(mp)) in xfs_fs_geometry()
1477 if (xfs_has_lazysbcount(mp)) in xfs_fs_geometry()
1479 if (xfs_has_attr2(mp)) in xfs_fs_geometry()
1481 if (xfs_has_projid32(mp)) in xfs_fs_geometry()
1483 if (xfs_has_crc(mp)) in xfs_fs_geometry()
1485 if (xfs_has_ftype(mp)) in xfs_fs_geometry()
1487 if (xfs_has_finobt(mp)) in xfs_fs_geometry()
1489 if (xfs_has_sparseinodes(mp)) in xfs_fs_geometry()
1491 if (xfs_has_rmapbt(mp)) in xfs_fs_geometry()
1493 if (xfs_has_reflink(mp)) in xfs_fs_geometry()
1495 if (xfs_has_bigtime(mp)) in xfs_fs_geometry()
1497 if (xfs_has_inobtcounts(mp)) in xfs_fs_geometry()
1499 if (xfs_has_parent(mp)) in xfs_fs_geometry()
1501 if (xfs_has_sector(mp)) { in xfs_fs_geometry()
1507 if (xfs_has_large_extent_counts(mp)) in xfs_fs_geometry()
1509 if (xfs_has_exchange_range(mp)) in xfs_fs_geometry()
1511 if (xfs_has_metadir(mp)) in xfs_fs_geometry()
1519 if (xfs_has_logv2(mp)) in xfs_fs_geometry()
1529 if (xfs_has_rtgroups(mp)) { in xfs_fs_geometry()
1538 struct xfs_mount *mp, in xfs_sb_read_secondary() argument
1547 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, in xfs_sb_read_secondary()
1548 XFS_AG_DADDR(mp, agno, XFS_SB_BLOCK(mp)), in xfs_sb_read_secondary()
1549 XFS_FSS_TO_BB(mp, 1), 0, &bp, &xfs_sb_buf_ops); in xfs_sb_read_secondary()
1551 xfs_agno_mark_sick(mp, agno, XFS_SICK_AG_SB); in xfs_sb_read_secondary()
1562 struct xfs_mount *mp, in xfs_sb_get_secondary() argument
1571 error = xfs_trans_get_buf(tp, mp->m_ddev_targp, in xfs_sb_get_secondary()
1572 XFS_AG_DADDR(mp, agno, XFS_SB_BLOCK(mp)), in xfs_sb_get_secondary()
1573 XFS_FSS_TO_BB(mp, 1), 0, &bp); in xfs_sb_get_secondary()
1590 struct xfs_mount *mp, in xfs_validate_stripe_geometry() argument
1599 xfs_notice(mp, in xfs_validate_stripe_geometry()
1606 xfs_notice(mp, in xfs_validate_stripe_geometry()
1613 xfs_notice(mp, in xfs_validate_stripe_geometry()
1621 xfs_notice(mp, in xfs_validate_stripe_geometry()
1628 xfs_notice(mp, in xfs_validate_stripe_geometry()
1635 xfs_notice(mp, in xfs_validate_stripe_geometry()
1646 * During mount, mp->m_dalign will not be set unless the sunit mount in xfs_validate_stripe_geometry()
1652 if (!mp->m_dalign) in xfs_validate_stripe_geometry()
1655 xfs_notice(mp, in xfs_validate_stripe_geometry()
1657 BBTOB(mp->m_dalign), BBTOB(mp->m_swidth)); in xfs_validate_stripe_geometry()