Lines Matching refs:mp

185 	struct xfs_mount	*mp,  in xfs_validate_sb_read()  argument
196 xfs_warn(mp, in xfs_validate_sb_read()
199 xfs_warn(mp, in xfs_validate_sb_read()
204 xfs_alert(mp, in xfs_validate_sb_read()
208 if (!xfs_is_readonly(mp)) { in xfs_validate_sb_read()
209 xfs_warn(mp, in xfs_validate_sb_read()
211 xfs_warn(mp, in xfs_validate_sb_read()
218 xfs_warn(mp, in xfs_validate_sb_read()
222 xfs_warn(mp, in xfs_validate_sb_read()
233 struct xfs_mount *mp, in xfs_validate_sb_write() argument
249 !xfs_verify_icount(mp, sbp->sb_icount) || in xfs_validate_sb_write()
251 xfs_warn(mp, "SB summary counter sanity check failed"); in xfs_validate_sb_write()
263 if (!xfs_is_readonly(mp) && in xfs_validate_sb_write()
265 xfs_alert(mp, in xfs_validate_sb_write()
272 xfs_warn(mp, in xfs_validate_sb_write()
280 xfs_warn(mp, in xfs_validate_sb_write()
292 if (!xfs_log_check_lsn(mp, sbp->sb_lsn)) in xfs_validate_sb_write()
301 struct xfs_mount *mp, in xfs_validate_sb_common() argument
311 xfs_warn(mp, in xfs_validate_sb_common()
318 xfs_warn(mp, in xfs_validate_sb_common()
328 xfs_notice(mp, in xfs_validate_sb_common()
336 xfs_notice(mp, in xfs_validate_sb_common()
352 xfs_warn(mp, in xfs_validate_sb_common()
360 xfs_notice(mp, in xfs_validate_sb_common()
366 sbp->sb_logstart == 0 && mp->m_logdev_targp == mp->m_ddev_targp)) { in xfs_validate_sb_common()
367 xfs_warn(mp, in xfs_validate_sb_common()
374 sbp->sb_logstart != 0 && mp->m_logdev_targp != mp->m_ddev_targp)) { in xfs_validate_sb_common()
375 xfs_warn(mp, in xfs_validate_sb_common()
411 XFS_FSB_TO_B(mp, sbp->sb_agblocks) < XFS_MIN_AG_BYTES || in xfs_validate_sb_common()
412 XFS_FSB_TO_B(mp, sbp->sb_agblocks) > XFS_MAX_AG_BYTES || in xfs_validate_sb_common()
423 xfs_notice(mp, "SB sanity check failed"); in xfs_validate_sb_common()
434 xfs_notice(mp, in xfs_validate_sb_common()
440 if (XFS_FSB_TO_B(mp, sbp->sb_logblocks) > XFS_MAX_LOG_BYTES) { in xfs_validate_sb_common()
441 xfs_warn(mp, in xfs_validate_sb_common()
443 XFS_FSB_TO_B(mp, sbp->sb_logblocks), in xfs_validate_sb_common()
455 xfs_notice(mp, in xfs_validate_sb_common()
461 xfs_notice(mp, in xfs_validate_sb_common()
469 xfs_notice(mp, in xfs_validate_sb_common()
475 xfs_notice(mp, in xfs_validate_sb_common()
485 xfs_notice(mp, in xfs_validate_sb_common()
493 xfs_notice(mp, in xfs_validate_sb_common()
509 xfs_notice(mp, in xfs_validate_sb_common()
521 xfs_notice(mp, "SB stripe alignment sanity check failed"); in xfs_validate_sb_common()
525 if (!xfs_validate_stripe_geometry(mp, XFS_FSB_TO_B(mp, sbp->sb_unit), in xfs_validate_sb_common()
526 XFS_FSB_TO_B(mp, sbp->sb_width), 0, in xfs_validate_sb_common()
540 xfs_warn(mp, "inode size of %d bytes not supported", in xfs_validate_sb_common()
840 struct xfs_mount *mp = bp->b_mount; in xfs_sb_read_verify() local
856 xfs_has_crc(mp)) { in xfs_sb_read_verify()
868 error = xfs_validate_sb_common(mp, bp, &sb); in xfs_sb_read_verify()
871 error = xfs_validate_sb_read(mp, &sb); in xfs_sb_read_verify()
906 struct xfs_mount *mp = bp->b_mount; in xfs_sb_write_verify() local
916 error = xfs_validate_sb_common(mp, bp, &sb); in xfs_sb_write_verify()
919 error = xfs_validate_sb_write(mp, bp, &sb); in xfs_sb_write_verify()
961 struct xfs_mount *mp, in xfs_sb_mount_common() argument
964 mp->m_agfrotor = 0; in xfs_sb_mount_common()
965 atomic_set(&mp->m_agirotor, 0); in xfs_sb_mount_common()
966 mp->m_maxagi = mp->m_sb.sb_agcount; in xfs_sb_mount_common()
967 mp->m_blkbit_log = sbp->sb_blocklog + XFS_NBBYLOG; in xfs_sb_mount_common()
968 mp->m_blkbb_log = sbp->sb_blocklog - BBSHIFT; in xfs_sb_mount_common()
969 mp->m_sectbb_log = sbp->sb_sectlog - BBSHIFT; in xfs_sb_mount_common()
970 mp->m_agno_log = xfs_highbit32(sbp->sb_agcount - 1) + 1; in xfs_sb_mount_common()
971 mp->m_blockmask = sbp->sb_blocksize - 1; in xfs_sb_mount_common()
972 mp->m_blockwsize = sbp->sb_blocksize >> XFS_WORDLOG; in xfs_sb_mount_common()
973 mp->m_blockwmask = mp->m_blockwsize - 1; in xfs_sb_mount_common()
975 mp->m_alloc_mxr[0] = xfs_allocbt_maxrecs(mp, sbp->sb_blocksize, 1); in xfs_sb_mount_common()
976 mp->m_alloc_mxr[1] = xfs_allocbt_maxrecs(mp, sbp->sb_blocksize, 0); in xfs_sb_mount_common()
977 mp->m_alloc_mnr[0] = mp->m_alloc_mxr[0] / 2; in xfs_sb_mount_common()
978 mp->m_alloc_mnr[1] = mp->m_alloc_mxr[1] / 2; in xfs_sb_mount_common()
980 mp->m_bmap_dmxr[0] = xfs_bmbt_maxrecs(mp, sbp->sb_blocksize, 1); in xfs_sb_mount_common()
981 mp->m_bmap_dmxr[1] = xfs_bmbt_maxrecs(mp, sbp->sb_blocksize, 0); in xfs_sb_mount_common()
982 mp->m_bmap_dmnr[0] = mp->m_bmap_dmxr[0] / 2; in xfs_sb_mount_common()
983 mp->m_bmap_dmnr[1] = mp->m_bmap_dmxr[1] / 2; in xfs_sb_mount_common()
985 mp->m_rmap_mxr[0] = xfs_rmapbt_maxrecs(sbp->sb_blocksize, 1); in xfs_sb_mount_common()
986 mp->m_rmap_mxr[1] = xfs_rmapbt_maxrecs(sbp->sb_blocksize, 0); in xfs_sb_mount_common()
987 mp->m_rmap_mnr[0] = mp->m_rmap_mxr[0] / 2; in xfs_sb_mount_common()
988 mp->m_rmap_mnr[1] = mp->m_rmap_mxr[1] / 2; in xfs_sb_mount_common()
990 mp->m_refc_mxr[0] = xfs_refcountbt_maxrecs(sbp->sb_blocksize, true); in xfs_sb_mount_common()
991 mp->m_refc_mxr[1] = xfs_refcountbt_maxrecs(sbp->sb_blocksize, false); in xfs_sb_mount_common()
992 mp->m_refc_mnr[0] = mp->m_refc_mxr[0] / 2; in xfs_sb_mount_common()
993 mp->m_refc_mnr[1] = mp->m_refc_mxr[1] / 2; in xfs_sb_mount_common()
995 mp->m_bsize = XFS_FSB_TO_BB(mp, 1); in xfs_sb_mount_common()
996 mp->m_alloc_set_aside = xfs_alloc_set_aside(mp); in xfs_sb_mount_common()
997 mp->m_ag_max_usable = xfs_alloc_ag_max_usable(mp); in xfs_sb_mount_common()
1010 struct xfs_mount *mp = tp->t_mountp; in xfs_log_sb() local
1026 if (xfs_has_lazysbcount(mp)) { in xfs_log_sb()
1027 mp->m_sb.sb_icount = percpu_counter_sum_positive(&mp->m_icount); in xfs_log_sb()
1028 mp->m_sb.sb_ifree = min_t(uint64_t, in xfs_log_sb()
1029 percpu_counter_sum_positive(&mp->m_ifree), in xfs_log_sb()
1030 mp->m_sb.sb_icount); in xfs_log_sb()
1031 mp->m_sb.sb_fdblocks = in xfs_log_sb()
1032 percpu_counter_sum_positive(&mp->m_fdblocks); in xfs_log_sb()
1035 xfs_sb_to_disk(bp->b_addr, &mp->m_sb); in xfs_log_sb()
1053 struct xfs_mount *mp, in xfs_sync_sb() argument
1059 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_sb, 0, 0, in xfs_sync_sb()
1082 struct xfs_mount *mp) in xfs_update_secondary_sbs() argument
1091 for_each_perag_from(mp, agno, pag) { in xfs_update_secondary_sbs()
1094 error = xfs_buf_get(mp->m_ddev_targp, in xfs_update_secondary_sbs()
1095 XFS_AG_DADDR(mp, pag->pag_agno, XFS_SB_DADDR), in xfs_update_secondary_sbs()
1096 XFS_FSS_TO_BB(mp, 1), &bp); in xfs_update_secondary_sbs()
1105 xfs_warn(mp, in xfs_update_secondary_sbs()
1116 xfs_sb_to_disk(bp->b_addr, &mp->m_sb); in xfs_update_secondary_sbs()
1126 xfs_warn(mp, in xfs_update_secondary_sbs()
1136 xfs_warn(mp, in xfs_update_secondary_sbs()
1150 struct xfs_mount *mp) in xfs_sync_sb_buf() argument
1156 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_sb, 0, 0, 0, &tp); in xfs_sync_sb_buf()
1178 struct xfs_mount *mp, in xfs_fs_geometry() argument
1182 struct xfs_sb *sbp = &mp->m_sb; in xfs_fs_geometry()
1214 if (xfs_has_attr(mp)) in xfs_fs_geometry()
1216 if (xfs_has_quota(mp)) in xfs_fs_geometry()
1218 if (xfs_has_align(mp)) in xfs_fs_geometry()
1220 if (xfs_has_dalign(mp)) in xfs_fs_geometry()
1222 if (xfs_has_asciici(mp)) in xfs_fs_geometry()
1224 if (xfs_has_lazysbcount(mp)) in xfs_fs_geometry()
1226 if (xfs_has_attr2(mp)) in xfs_fs_geometry()
1228 if (xfs_has_projid32(mp)) in xfs_fs_geometry()
1230 if (xfs_has_crc(mp)) in xfs_fs_geometry()
1232 if (xfs_has_ftype(mp)) in xfs_fs_geometry()
1234 if (xfs_has_finobt(mp)) in xfs_fs_geometry()
1236 if (xfs_has_sparseinodes(mp)) in xfs_fs_geometry()
1238 if (xfs_has_rmapbt(mp)) in xfs_fs_geometry()
1240 if (xfs_has_reflink(mp)) in xfs_fs_geometry()
1242 if (xfs_has_bigtime(mp)) in xfs_fs_geometry()
1244 if (xfs_has_inobtcounts(mp)) in xfs_fs_geometry()
1246 if (xfs_has_sector(mp)) { in xfs_fs_geometry()
1252 if (xfs_has_large_extent_counts(mp)) in xfs_fs_geometry()
1260 if (xfs_has_logv2(mp)) in xfs_fs_geometry()
1274 struct xfs_mount *mp, in xfs_sb_read_secondary() argument
1283 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, in xfs_sb_read_secondary()
1284 XFS_AG_DADDR(mp, agno, XFS_SB_BLOCK(mp)), in xfs_sb_read_secondary()
1285 XFS_FSS_TO_BB(mp, 1), 0, &bp, &xfs_sb_buf_ops); in xfs_sb_read_secondary()
1296 struct xfs_mount *mp, in xfs_sb_get_secondary() argument
1305 error = xfs_trans_get_buf(tp, mp->m_ddev_targp, in xfs_sb_get_secondary()
1306 XFS_AG_DADDR(mp, agno, XFS_SB_BLOCK(mp)), in xfs_sb_get_secondary()
1307 XFS_FSS_TO_BB(mp, 1), 0, &bp); in xfs_sb_get_secondary()
1324 struct xfs_mount *mp, in xfs_validate_stripe_geometry() argument
1333 xfs_notice(mp, in xfs_validate_stripe_geometry()
1340 xfs_notice(mp, in xfs_validate_stripe_geometry()
1347 xfs_notice(mp, in xfs_validate_stripe_geometry()
1355 xfs_notice(mp, in xfs_validate_stripe_geometry()
1362 xfs_notice(mp, in xfs_validate_stripe_geometry()
1369 xfs_notice(mp, in xfs_validate_stripe_geometry()
1386 if (!mp->m_dalign) in xfs_validate_stripe_geometry()
1389 xfs_notice(mp, in xfs_validate_stripe_geometry()
1391 BBTOB(mp->m_dalign), BBTOB(mp->m_swidth)); in xfs_validate_stripe_geometry()