Lines Matching full:mp
183 struct xfs_mount *mp, in xfs_validate_sb_read() argument
194 xfs_warn(mp, in xfs_validate_sb_read()
197 xfs_warn(mp, in xfs_validate_sb_read()
202 xfs_alert(mp, in xfs_validate_sb_read()
206 if (!xfs_is_readonly(mp)) { in xfs_validate_sb_read()
207 xfs_warn(mp, in xfs_validate_sb_read()
209 xfs_warn(mp, in xfs_validate_sb_read()
216 xfs_warn(mp, in xfs_validate_sb_read()
220 xfs_warn(mp, in xfs_validate_sb_read()
231 struct xfs_mount *mp, in xfs_validate_sb_write() argument
247 !xfs_verify_icount(mp, sbp->sb_icount) || in xfs_validate_sb_write()
249 xfs_warn(mp, "SB summary counter sanity check failed"); in xfs_validate_sb_write()
262 xfs_warn(mp, in xfs_validate_sb_write()
269 xfs_alert(mp, in xfs_validate_sb_write()
276 xfs_warn(mp, in xfs_validate_sb_write()
284 xfs_warn(mp, in xfs_validate_sb_write()
296 if (!xfs_log_check_lsn(mp, sbp->sb_lsn)) in xfs_validate_sb_write()
305 struct xfs_mount *mp, in xfs_validate_sb_common() argument
315 xfs_warn(mp, in xfs_validate_sb_common()
322 xfs_warn(mp, in xfs_validate_sb_common()
332 xfs_notice(mp, in xfs_validate_sb_common()
340 xfs_notice(mp, in xfs_validate_sb_common()
356 xfs_warn(mp, in xfs_validate_sb_common()
364 xfs_notice(mp, in xfs_validate_sb_common()
370 sbp->sb_logstart == 0 && mp->m_logdev_targp == mp->m_ddev_targp)) { in xfs_validate_sb_common()
371 xfs_warn(mp, in xfs_validate_sb_common()
378 sbp->sb_logstart != 0 && mp->m_logdev_targp != mp->m_ddev_targp)) { in xfs_validate_sb_common()
379 xfs_warn(mp, in xfs_validate_sb_common()
416 XFS_FSB_TO_B(mp, sbp->sb_agblocks) < XFS_MIN_AG_BYTES || in xfs_validate_sb_common()
417 XFS_FSB_TO_B(mp, sbp->sb_agblocks) > XFS_MAX_AG_BYTES || in xfs_validate_sb_common()
428 xfs_notice(mp, "SB sanity check failed"); in xfs_validate_sb_common()
435 xfs_notice(mp, in xfs_validate_sb_common()
443 xfs_notice(mp, in xfs_validate_sb_common()
458 xfs_notice(mp, in xfs_validate_sb_common()
470 xfs_notice(mp, "SB stripe alignment sanity check failed"); in xfs_validate_sb_common()
474 if (!xfs_validate_stripe_geometry(mp, XFS_FSB_TO_B(mp, sbp->sb_unit), in xfs_validate_sb_common()
475 XFS_FSB_TO_B(mp, sbp->sb_width), 0, false)) in xfs_validate_sb_common()
488 xfs_warn(mp, "inode size of %d bytes not supported", in xfs_validate_sb_common()
788 struct xfs_mount *mp = bp->b_mount; in xfs_sb_read_verify() local
804 xfs_has_crc(mp)) { in xfs_sb_read_verify()
816 error = xfs_validate_sb_common(mp, bp, &sb); in xfs_sb_read_verify()
819 error = xfs_validate_sb_read(mp, &sb); in xfs_sb_read_verify()
854 struct xfs_mount *mp = bp->b_mount; in xfs_sb_write_verify() local
864 error = xfs_validate_sb_common(mp, bp, &sb); in xfs_sb_write_verify()
867 error = xfs_validate_sb_write(mp, bp, &sb); in xfs_sb_write_verify()
909 struct xfs_mount *mp, in xfs_sb_mount_common() argument
912 mp->m_agfrotor = mp->m_agirotor = 0; in xfs_sb_mount_common()
913 mp->m_maxagi = mp->m_sb.sb_agcount; in xfs_sb_mount_common()
914 mp->m_blkbit_log = sbp->sb_blocklog + XFS_NBBYLOG; in xfs_sb_mount_common()
915 mp->m_blkbb_log = sbp->sb_blocklog - BBSHIFT; in xfs_sb_mount_common()
916 mp->m_sectbb_log = sbp->sb_sectlog - BBSHIFT; in xfs_sb_mount_common()
917 mp->m_agno_log = xfs_highbit32(sbp->sb_agcount - 1) + 1; in xfs_sb_mount_common()
918 mp->m_blockmask = sbp->sb_blocksize - 1; in xfs_sb_mount_common()
919 mp->m_blockwsize = sbp->sb_blocksize >> XFS_WORDLOG; in xfs_sb_mount_common()
920 mp->m_blockwmask = mp->m_blockwsize - 1; in xfs_sb_mount_common()
922 mp->m_alloc_mxr[0] = xfs_allocbt_maxrecs(mp, sbp->sb_blocksize, 1); in xfs_sb_mount_common()
923 mp->m_alloc_mxr[1] = xfs_allocbt_maxrecs(mp, sbp->sb_blocksize, 0); in xfs_sb_mount_common()
924 mp->m_alloc_mnr[0] = mp->m_alloc_mxr[0] / 2; in xfs_sb_mount_common()
925 mp->m_alloc_mnr[1] = mp->m_alloc_mxr[1] / 2; in xfs_sb_mount_common()
927 mp->m_bmap_dmxr[0] = xfs_bmbt_maxrecs(mp, sbp->sb_blocksize, 1); in xfs_sb_mount_common()
928 mp->m_bmap_dmxr[1] = xfs_bmbt_maxrecs(mp, sbp->sb_blocksize, 0); in xfs_sb_mount_common()
929 mp->m_bmap_dmnr[0] = mp->m_bmap_dmxr[0] / 2; in xfs_sb_mount_common()
930 mp->m_bmap_dmnr[1] = mp->m_bmap_dmxr[1] / 2; in xfs_sb_mount_common()
932 mp->m_rmap_mxr[0] = xfs_rmapbt_maxrecs(sbp->sb_blocksize, 1); in xfs_sb_mount_common()
933 mp->m_rmap_mxr[1] = xfs_rmapbt_maxrecs(sbp->sb_blocksize, 0); in xfs_sb_mount_common()
934 mp->m_rmap_mnr[0] = mp->m_rmap_mxr[0] / 2; in xfs_sb_mount_common()
935 mp->m_rmap_mnr[1] = mp->m_rmap_mxr[1] / 2; in xfs_sb_mount_common()
937 mp->m_refc_mxr[0] = xfs_refcountbt_maxrecs(sbp->sb_blocksize, true); in xfs_sb_mount_common()
938 mp->m_refc_mxr[1] = xfs_refcountbt_maxrecs(sbp->sb_blocksize, false); in xfs_sb_mount_common()
939 mp->m_refc_mnr[0] = mp->m_refc_mxr[0] / 2; in xfs_sb_mount_common()
940 mp->m_refc_mnr[1] = mp->m_refc_mxr[1] / 2; in xfs_sb_mount_common()
942 mp->m_bsize = XFS_FSB_TO_BB(mp, 1); in xfs_sb_mount_common()
943 mp->m_alloc_set_aside = xfs_alloc_set_aside(mp); in xfs_sb_mount_common()
944 mp->m_ag_max_usable = xfs_alloc_ag_max_usable(mp); in xfs_sb_mount_common()
957 struct xfs_mount *mp = tp->t_mountp; in xfs_log_sb() local
973 if (xfs_has_lazysbcount(mp)) { in xfs_log_sb()
974 mp->m_sb.sb_icount = percpu_counter_sum(&mp->m_icount); in xfs_log_sb()
975 mp->m_sb.sb_ifree = percpu_counter_sum(&mp->m_ifree); in xfs_log_sb()
976 mp->m_sb.sb_fdblocks = percpu_counter_sum(&mp->m_fdblocks); in xfs_log_sb()
979 xfs_sb_to_disk(bp->b_addr, &mp->m_sb); in xfs_log_sb()
997 struct xfs_mount *mp, in xfs_sync_sb() argument
1003 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_sb, 0, 0, in xfs_sync_sb()
1026 struct xfs_mount *mp) in xfs_update_secondary_sbs() argument
1035 for_each_perag_from(mp, agno, pag) { in xfs_update_secondary_sbs()
1038 error = xfs_buf_get(mp->m_ddev_targp, in xfs_update_secondary_sbs()
1039 XFS_AG_DADDR(mp, pag->pag_agno, XFS_SB_DADDR), in xfs_update_secondary_sbs()
1040 XFS_FSS_TO_BB(mp, 1), &bp); in xfs_update_secondary_sbs()
1049 xfs_warn(mp, in xfs_update_secondary_sbs()
1060 xfs_sb_to_disk(bp->b_addr, &mp->m_sb); in xfs_update_secondary_sbs()
1070 xfs_warn(mp, in xfs_update_secondary_sbs()
1080 xfs_warn(mp, in xfs_update_secondary_sbs()
1094 struct xfs_mount *mp) in xfs_sync_sb_buf() argument
1100 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_sb, 0, 0, 0, &tp); in xfs_sync_sb_buf()
1122 struct xfs_mount *mp, in xfs_fs_geometry() argument
1126 struct xfs_sb *sbp = &mp->m_sb; in xfs_fs_geometry()
1158 if (xfs_has_attr(mp)) in xfs_fs_geometry()
1160 if (xfs_has_quota(mp)) in xfs_fs_geometry()
1162 if (xfs_has_align(mp)) in xfs_fs_geometry()
1164 if (xfs_has_dalign(mp)) in xfs_fs_geometry()
1166 if (xfs_has_asciici(mp)) in xfs_fs_geometry()
1168 if (xfs_has_lazysbcount(mp)) in xfs_fs_geometry()
1170 if (xfs_has_attr2(mp)) in xfs_fs_geometry()
1172 if (xfs_has_projid32(mp)) in xfs_fs_geometry()
1174 if (xfs_has_crc(mp)) in xfs_fs_geometry()
1176 if (xfs_has_ftype(mp)) in xfs_fs_geometry()
1178 if (xfs_has_finobt(mp)) in xfs_fs_geometry()
1180 if (xfs_has_sparseinodes(mp)) in xfs_fs_geometry()
1182 if (xfs_has_rmapbt(mp)) in xfs_fs_geometry()
1184 if (xfs_has_reflink(mp)) in xfs_fs_geometry()
1186 if (xfs_has_bigtime(mp)) in xfs_fs_geometry()
1188 if (xfs_has_inobtcounts(mp)) in xfs_fs_geometry()
1190 if (xfs_has_sector(mp)) { in xfs_fs_geometry()
1196 if (xfs_has_large_extent_counts(mp)) in xfs_fs_geometry()
1204 if (xfs_has_logv2(mp)) in xfs_fs_geometry()
1218 struct xfs_mount *mp, in xfs_sb_read_secondary() argument
1227 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, in xfs_sb_read_secondary()
1228 XFS_AG_DADDR(mp, agno, XFS_SB_BLOCK(mp)), in xfs_sb_read_secondary()
1229 XFS_FSS_TO_BB(mp, 1), 0, &bp, &xfs_sb_buf_ops); in xfs_sb_read_secondary()
1240 struct xfs_mount *mp, in xfs_sb_get_secondary() argument
1249 error = xfs_trans_get_buf(tp, mp->m_ddev_targp, in xfs_sb_get_secondary()
1250 XFS_AG_DADDR(mp, agno, XFS_SB_BLOCK(mp)), in xfs_sb_get_secondary()
1251 XFS_FSS_TO_BB(mp, 1), 0, &bp); in xfs_sb_get_secondary()
1266 struct xfs_mount *mp, in xfs_validate_stripe_geometry() argument
1274 xfs_notice(mp, in xfs_validate_stripe_geometry()
1281 xfs_notice(mp, in xfs_validate_stripe_geometry()
1288 xfs_notice(mp, in xfs_validate_stripe_geometry()
1296 xfs_notice(mp, in xfs_validate_stripe_geometry()
1303 xfs_notice(mp, in xfs_validate_stripe_geometry()
1310 xfs_notice(mp, in xfs_validate_stripe_geometry()