Lines Matching full:mp
58 struct xfs_mount *mp) in xfs_uuid_mount() argument
60 uuid_t *uuid = &mp->m_sb.sb_uuid; in xfs_uuid_mount()
64 uuid_copy(&mp->m_super->s_uuid, uuid); in xfs_uuid_mount()
66 if (xfs_has_nouuid(mp)) in xfs_uuid_mount()
70 xfs_warn(mp, "Filesystem has null UUID - can't mount"); in xfs_uuid_mount()
97 xfs_warn(mp, "Filesystem has duplicate UUID %pU - can't mount", uuid); in xfs_uuid_mount()
103 struct xfs_mount *mp) in xfs_uuid_unmount() argument
105 uuid_t *uuid = &mp->m_sb.sb_uuid; in xfs_uuid_unmount()
108 if (xfs_has_nouuid(mp)) in xfs_uuid_unmount()
149 struct xfs_mount *mp, in xfs_readsb() argument
154 struct xfs_sb *sbp = &mp->m_sb; in xfs_readsb()
159 ASSERT(mp->m_sb_bp == NULL); in xfs_readsb()
160 ASSERT(mp->m_ddev_targp != NULL); in xfs_readsb()
169 sector_size = xfs_getsize_buftarg(mp->m_ddev_targp); in xfs_readsb()
179 error = xfs_buf_read_uncached(mp->m_ddev_targp, XFS_SB_DADDR, in xfs_readsb()
184 xfs_warn(mp, "SB validate failed with error %d.", error); in xfs_readsb()
202 xfs_warn(mp, "Invalid superblock magic number"); in xfs_readsb()
212 xfs_warn(mp, "device supports %u byte sectors (not %u)", in xfs_readsb()
229 mp->m_features |= xfs_sb_version_to_features(sbp); in xfs_readsb()
230 xfs_reinit_percpu_counters(mp); in xfs_readsb()
235 mp->m_sb_bp = bp; in xfs_readsb()
252 struct xfs_mount *mp, in xfs_check_new_dalign() argument
256 struct xfs_sb *sbp = &mp->m_sb; in xfs_check_new_dalign()
259 calc_ino = xfs_ialloc_calc_rootino(mp, new_dalign); in xfs_check_new_dalign()
260 trace_xfs_check_new_dalign(mp, new_dalign, calc_ino); in xfs_check_new_dalign()
267 xfs_warn(mp, in xfs_check_new_dalign()
275 xfs_warn(mp, "Skipping superblock stripe alignment update."); in xfs_check_new_dalign()
288 struct xfs_mount *mp) in xfs_validate_new_dalign() argument
290 if (mp->m_dalign == 0) in xfs_validate_new_dalign()
297 if ((BBTOB(mp->m_dalign) & mp->m_blockmask) || in xfs_validate_new_dalign()
298 (BBTOB(mp->m_swidth) & mp->m_blockmask)) { in xfs_validate_new_dalign()
299 xfs_warn(mp, in xfs_validate_new_dalign()
301 mp->m_sb.sb_blocksize); in xfs_validate_new_dalign()
308 mp->m_dalign = XFS_BB_TO_FSBT(mp, mp->m_dalign); in xfs_validate_new_dalign()
309 if (mp->m_dalign && (mp->m_sb.sb_agblocks % mp->m_dalign)) { in xfs_validate_new_dalign()
310 xfs_warn(mp, in xfs_validate_new_dalign()
312 mp->m_sb.sb_agblocks); in xfs_validate_new_dalign()
316 if (!mp->m_dalign) { in xfs_validate_new_dalign()
317 xfs_warn(mp, in xfs_validate_new_dalign()
319 mp->m_dalign, mp->m_sb.sb_blocksize); in xfs_validate_new_dalign()
323 mp->m_swidth = XFS_BB_TO_FSBT(mp, mp->m_swidth); in xfs_validate_new_dalign()
325 if (!xfs_has_dalign(mp)) { in xfs_validate_new_dalign()
326 xfs_warn(mp, in xfs_validate_new_dalign()
337 struct xfs_mount *mp) in xfs_update_alignment() argument
339 struct xfs_sb *sbp = &mp->m_sb; in xfs_update_alignment()
341 if (mp->m_dalign) { in xfs_update_alignment()
345 if (sbp->sb_unit == mp->m_dalign && in xfs_update_alignment()
346 sbp->sb_width == mp->m_swidth) in xfs_update_alignment()
349 error = xfs_check_new_dalign(mp, mp->m_dalign, &update_sb); in xfs_update_alignment()
353 sbp->sb_unit = mp->m_dalign; in xfs_update_alignment()
354 sbp->sb_width = mp->m_swidth; in xfs_update_alignment()
355 mp->m_update_sb = true; in xfs_update_alignment()
356 } else if (!xfs_has_noalign(mp) && xfs_has_dalign(mp)) { in xfs_update_alignment()
357 mp->m_dalign = sbp->sb_unit; in xfs_update_alignment()
358 mp->m_swidth = sbp->sb_width; in xfs_update_alignment()
369 struct xfs_mount *mp) in xfs_set_low_space_thresholds() argument
371 uint64_t dblocks = mp->m_sb.sb_dblocks; in xfs_set_low_space_thresholds()
372 uint64_t rtexts = mp->m_sb.sb_rextents; in xfs_set_low_space_thresholds()
379 mp->m_low_space[i] = dblocks * (i + 1); in xfs_set_low_space_thresholds()
380 mp->m_low_rtexts[i] = rtexts * (i + 1); in xfs_set_low_space_thresholds()
389 struct xfs_mount *mp) in xfs_check_sizes() argument
395 d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks); in xfs_check_sizes()
396 if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_dblocks) { in xfs_check_sizes()
397 xfs_warn(mp, "filesystem size mismatch detected"); in xfs_check_sizes()
400 error = xfs_buf_read_uncached(mp->m_ddev_targp, in xfs_check_sizes()
401 d - XFS_FSS_TO_BB(mp, 1), in xfs_check_sizes()
402 XFS_FSS_TO_BB(mp, 1), 0, &bp, NULL); in xfs_check_sizes()
404 xfs_warn(mp, "last sector read failed"); in xfs_check_sizes()
409 if (mp->m_logdev_targp == mp->m_ddev_targp) in xfs_check_sizes()
412 d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_logblocks); in xfs_check_sizes()
413 if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_logblocks) { in xfs_check_sizes()
414 xfs_warn(mp, "log size mismatch detected"); in xfs_check_sizes()
417 error = xfs_buf_read_uncached(mp->m_logdev_targp, in xfs_check_sizes()
418 d - XFS_FSB_TO_BB(mp, 1), in xfs_check_sizes()
419 XFS_FSB_TO_BB(mp, 1), 0, &bp, NULL); in xfs_check_sizes()
421 xfs_warn(mp, "log device read failed"); in xfs_check_sizes()
433 struct xfs_mount *mp) in xfs_mount_reset_sbqflags() argument
435 mp->m_qflags = 0; in xfs_mount_reset_sbqflags()
438 if (mp->m_sb.sb_qflags == 0) in xfs_mount_reset_sbqflags()
440 spin_lock(&mp->m_sb_lock); in xfs_mount_reset_sbqflags()
441 mp->m_sb.sb_qflags = 0; in xfs_mount_reset_sbqflags()
442 spin_unlock(&mp->m_sb_lock); in xfs_mount_reset_sbqflags()
444 if (!xfs_fs_writable(mp, SB_FREEZE_WRITE)) in xfs_mount_reset_sbqflags()
447 return xfs_sync_sb(mp, false); in xfs_mount_reset_sbqflags()
451 xfs_default_resblks(xfs_mount_t *mp) in xfs_default_resblks() argument
462 resblks = mp->m_sb.sb_dblocks; in xfs_default_resblks()
471 struct xfs_mount *mp) in xfs_check_summary_counts() argument
479 if (mp->m_sb.sb_inprogress) { in xfs_check_summary_counts()
480 xfs_err(mp, "sb_inprogress set after log recovery??"); in xfs_check_summary_counts()
496 if (xfs_is_clean(mp) && in xfs_check_summary_counts()
497 (mp->m_sb.sb_fdblocks > mp->m_sb.sb_dblocks || in xfs_check_summary_counts()
498 !xfs_verify_icount(mp, mp->m_sb.sb_icount) || in xfs_check_summary_counts()
499 mp->m_sb.sb_ifree > mp->m_sb.sb_icount)) in xfs_check_summary_counts()
500 xfs_fs_mark_sick(mp, XFS_SICK_FS_COUNTERS); in xfs_check_summary_counts()
513 if ((xfs_has_lazysbcount(mp) && !xfs_is_clean(mp)) || in xfs_check_summary_counts()
514 xfs_fs_has_sickness(mp, XFS_SICK_FS_COUNTERS)) { in xfs_check_summary_counts()
515 error = xfs_initialize_perag_data(mp, mp->m_sb.sb_agcount); in xfs_check_summary_counts()
532 if (xfs_has_realtime(mp) && !xfs_is_clean(mp)) { in xfs_check_summary_counts()
533 error = xfs_rtalloc_reinit_frextents(mp); in xfs_check_summary_counts()
569 struct xfs_mount *mp) in xfs_unmount_flush_inodes() argument
571 xfs_log_force(mp, XFS_LOG_SYNC); in xfs_unmount_flush_inodes()
572 xfs_extent_busy_wait_all(mp); in xfs_unmount_flush_inodes()
575 set_bit(XFS_OPSTATE_UNMOUNTING, &mp->m_opstate); in xfs_unmount_flush_inodes()
577 xfs_ail_push_all_sync(mp->m_ail); in xfs_unmount_flush_inodes()
578 xfs_inodegc_stop(mp); in xfs_unmount_flush_inodes()
579 cancel_delayed_work_sync(&mp->m_reclaim_work); in xfs_unmount_flush_inodes()
580 xfs_reclaim_inodes(mp); in xfs_unmount_flush_inodes()
581 xfs_health_unmount(mp); in xfs_unmount_flush_inodes()
586 struct xfs_mount *mp) in xfs_mount_setup_inode_geom() argument
588 struct xfs_ino_geometry *igeo = M_IGEO(mp); in xfs_mount_setup_inode_geom()
590 igeo->attr_fork_offset = xfs_bmap_compute_attr_offset(mp); in xfs_mount_setup_inode_geom()
591 ASSERT(igeo->attr_fork_offset < XFS_LITINO(mp)); in xfs_mount_setup_inode_geom()
593 xfs_ialloc_setup_geometry(mp); in xfs_mount_setup_inode_geom()
599 struct xfs_mount *mp) in xfs_agbtree_compute_maxlevels() argument
603 levels = max(mp->m_alloc_maxlevels, M_IGEO(mp)->inobt_maxlevels); in xfs_agbtree_compute_maxlevels()
604 levels = max(levels, mp->m_rmap_maxlevels); in xfs_agbtree_compute_maxlevels()
605 mp->m_agbtree_maxlevels = max(levels, mp->m_refc_maxlevels); in xfs_agbtree_compute_maxlevels()
620 struct xfs_mount *mp) in xfs_mountfs() argument
622 struct xfs_sb *sbp = &(mp->m_sb); in xfs_mountfs()
624 struct xfs_ino_geometry *igeo = M_IGEO(mp); in xfs_mountfs()
630 xfs_sb_mount_common(mp, sbp); in xfs_mountfs()
649 xfs_warn(mp, "correcting sb_features alignment problem"); in xfs_mountfs()
651 mp->m_update_sb = true; in xfs_mountfs()
656 if (!(mp->m_sb.sb_versionnum & XFS_SB_VERSION_NLINKBIT)) { in xfs_mountfs()
657 mp->m_sb.sb_versionnum |= XFS_SB_VERSION_NLINKBIT; in xfs_mountfs()
658 mp->m_features |= XFS_FEAT_NLINK; in xfs_mountfs()
659 mp->m_update_sb = true; in xfs_mountfs()
668 error = xfs_validate_new_dalign(mp); in xfs_mountfs()
672 xfs_alloc_compute_maxlevels(mp); in xfs_mountfs()
673 xfs_bmap_compute_maxlevels(mp, XFS_DATA_FORK); in xfs_mountfs()
674 xfs_bmap_compute_maxlevels(mp, XFS_ATTR_FORK); in xfs_mountfs()
675 xfs_mount_setup_inode_geom(mp); in xfs_mountfs()
676 xfs_rmapbt_compute_maxlevels(mp); in xfs_mountfs()
677 xfs_refcountbt_compute_maxlevels(mp); in xfs_mountfs()
679 xfs_agbtree_compute_maxlevels(mp); in xfs_mountfs()
688 error = xfs_update_alignment(mp); in xfs_mountfs()
693 mp->m_fail_unmount = true; in xfs_mountfs()
695 error = xfs_sysfs_init(&mp->m_kobj, &xfs_mp_ktype, in xfs_mountfs()
696 NULL, mp->m_super->s_id); in xfs_mountfs()
700 error = xfs_sysfs_init(&mp->m_stats.xs_kobj, &xfs_stats_ktype, in xfs_mountfs()
701 &mp->m_kobj, "stats"); in xfs_mountfs()
705 error = xfs_error_sysfs_init(mp); in xfs_mountfs()
709 error = xfs_errortag_init(mp); in xfs_mountfs()
713 error = xfs_uuid_mount(mp); in xfs_mountfs()
721 mp->m_allocsize_log = in xfs_mountfs()
722 max_t(uint32_t, sbp->sb_blocklog, mp->m_allocsize_log); in xfs_mountfs()
723 mp->m_allocsize_blocks = 1U << (mp->m_allocsize_log - sbp->sb_blocklog); in xfs_mountfs()
726 xfs_set_low_space_thresholds(mp); in xfs_mountfs()
733 if (xfs_has_sparseinodes(mp) && in xfs_mountfs()
734 mp->m_sb.sb_spino_align != in xfs_mountfs()
735 XFS_B_TO_FSBT(mp, igeo->inode_cluster_size_raw)) { in xfs_mountfs()
736 xfs_warn(mp, in xfs_mountfs()
738 mp->m_sb.sb_spino_align, in xfs_mountfs()
739 XFS_B_TO_FSBT(mp, igeo->inode_cluster_size_raw)); in xfs_mountfs()
747 error = xfs_check_sizes(mp); in xfs_mountfs()
754 error = xfs_rtmount_init(mp); in xfs_mountfs()
756 xfs_warn(mp, "RT mount failed"); in xfs_mountfs()
764 mp->m_fixedfsid[0] = in xfs_mountfs()
767 mp->m_fixedfsid[1] = get_unaligned_be32(&sbp->sb_uuid.b[0]); in xfs_mountfs()
769 error = xfs_da_mount(mp); in xfs_mountfs()
771 xfs_warn(mp, "Failed dir/attr init: %d", error); in xfs_mountfs()
778 xfs_trans_init(mp); in xfs_mountfs()
783 error = xfs_initialize_perag(mp, sbp->sb_agcount, mp->m_sb.sb_dblocks, in xfs_mountfs()
784 &mp->m_maxagi); in xfs_mountfs()
786 xfs_warn(mp, "Failed per-ag init: %d", error); in xfs_mountfs()
790 if (XFS_IS_CORRUPT(mp, !sbp->sb_logblocks)) { in xfs_mountfs()
791 xfs_warn(mp, "no log defined"); in xfs_mountfs()
796 error = xfs_inodegc_register_shrinker(mp); in xfs_mountfs()
805 error = xfs_log_mount(mp, mp->m_logdev_targp, in xfs_mountfs()
806 XFS_FSB_TO_DADDR(mp, sbp->sb_logstart), in xfs_mountfs()
807 XFS_FSB_TO_BB(mp, sbp->sb_logblocks)); in xfs_mountfs()
809 xfs_warn(mp, "log mount failed"); in xfs_mountfs()
814 xfs_inodegc_start(mp); in xfs_mountfs()
815 xfs_blockgc_start(mp); in xfs_mountfs()
823 if (xfs_has_noattr2(mp)) { in xfs_mountfs()
824 mp->m_features &= ~XFS_FEAT_ATTR2; in xfs_mountfs()
825 } else if (!xfs_has_attr2(mp) && in xfs_mountfs()
826 (mp->m_sb.sb_features2 & XFS_SB_VERSION2_ATTR2BIT)) { in xfs_mountfs()
827 mp->m_features |= XFS_FEAT_ATTR2; in xfs_mountfs()
834 error = xfs_iget(mp, NULL, sbp->sb_rootino, XFS_IGET_UNTRUSTED, in xfs_mountfs()
837 xfs_warn(mp, in xfs_mountfs()
845 if (XFS_IS_CORRUPT(mp, !S_ISDIR(VFS_I(rip)->i_mode))) { in xfs_mountfs()
846 xfs_warn(mp, "corrupted root inode %llu: not a directory", in xfs_mountfs()
852 mp->m_rootip = rip; /* save it */ in xfs_mountfs()
859 error = xfs_rtmount_inodes(mp); in xfs_mountfs()
864 xfs_warn(mp, "failed to read RT inodes"); in xfs_mountfs()
869 error = xfs_check_summary_counts(mp); in xfs_mountfs()
878 if (mp->m_update_sb && !xfs_is_readonly(mp)) { in xfs_mountfs()
879 error = xfs_sync_sb(mp, false); in xfs_mountfs()
881 xfs_warn(mp, "failed to write sb changes"); in xfs_mountfs()
889 if (XFS_IS_QUOTA_ON(mp)) { in xfs_mountfs()
890 error = xfs_qm_newmount(mp, "amount, "aflags); in xfs_mountfs()
899 if (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_ACCT) { in xfs_mountfs()
900 xfs_notice(mp, "resetting quota flags"); in xfs_mountfs()
901 error = xfs_mount_reset_sbqflags(mp); in xfs_mountfs()
915 error = xfs_fs_reserve_ag_blocks(mp); in xfs_mountfs()
917 xfs_warn(mp, in xfs_mountfs()
919 error = xfs_log_mount_finish(mp); in xfs_mountfs()
920 xfs_fs_unreserve_ag_blocks(mp); in xfs_mountfs()
922 xfs_warn(mp, "log mount finish failed"); in xfs_mountfs()
935 if (xfs_is_readonly(mp) && !xfs_has_norecovery(mp)) in xfs_mountfs()
936 xfs_log_clean(mp); in xfs_mountfs()
942 ASSERT(mp->m_qflags == 0); in xfs_mountfs()
943 mp->m_qflags = quotaflags; in xfs_mountfs()
945 xfs_qm_mount_quotas(mp); in xfs_mountfs()
959 if (!xfs_is_readonly(mp)) { in xfs_mountfs()
960 resblks = xfs_default_resblks(mp); in xfs_mountfs()
961 error = xfs_reserve_blocks(mp, &resblks, NULL); in xfs_mountfs()
963 xfs_warn(mp, in xfs_mountfs()
967 error = xfs_fs_reserve_ag_blocks(mp); in xfs_mountfs()
975 xfs_fs_unreserve_ag_blocks(mp); in xfs_mountfs()
976 xfs_qm_unmount_quotas(mp); in xfs_mountfs()
978 xfs_rtunmount_inodes(mp); in xfs_mountfs()
982 xfs_qm_unmount(mp); in xfs_mountfs()
990 xfs_inodegc_flush(mp); in xfs_mountfs()
1003 xfs_unmount_flush_inodes(mp); in xfs_mountfs()
1005 xfs_log_mount_cancel(mp); in xfs_mountfs()
1007 unregister_shrinker(&mp->m_inodegc_shrinker); in xfs_mountfs()
1009 if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp) in xfs_mountfs()
1010 xfs_buftarg_drain(mp->m_logdev_targp); in xfs_mountfs()
1011 xfs_buftarg_drain(mp->m_ddev_targp); in xfs_mountfs()
1013 xfs_free_perag(mp); in xfs_mountfs()
1015 xfs_da_unmount(mp); in xfs_mountfs()
1017 xfs_uuid_unmount(mp); in xfs_mountfs()
1019 xfs_errortag_del(mp); in xfs_mountfs()
1021 xfs_error_sysfs_del(mp); in xfs_mountfs()
1023 xfs_sysfs_del(&mp->m_stats.xs_kobj); in xfs_mountfs()
1025 xfs_sysfs_del(&mp->m_kobj); in xfs_mountfs()
1036 struct xfs_mount *mp) in xfs_unmountfs() argument
1049 xfs_inodegc_flush(mp); in xfs_unmountfs()
1051 xfs_blockgc_stop(mp); in xfs_unmountfs()
1052 xfs_fs_unreserve_ag_blocks(mp); in xfs_unmountfs()
1053 xfs_qm_unmount_quotas(mp); in xfs_unmountfs()
1054 xfs_rtunmount_inodes(mp); in xfs_unmountfs()
1055 xfs_irele(mp->m_rootip); in xfs_unmountfs()
1057 xfs_unmount_flush_inodes(mp); in xfs_unmountfs()
1059 xfs_qm_unmount(mp); in xfs_unmountfs()
1076 error = xfs_reserve_blocks(mp, &resblks, NULL); in xfs_unmountfs()
1078 xfs_warn(mp, "Unable to free reserved block pool. " in xfs_unmountfs()
1081 xfs_log_unmount(mp); in xfs_unmountfs()
1082 xfs_da_unmount(mp); in xfs_unmountfs()
1083 xfs_uuid_unmount(mp); in xfs_unmountfs()
1086 xfs_errortag_clearall(mp); in xfs_unmountfs()
1088 unregister_shrinker(&mp->m_inodegc_shrinker); in xfs_unmountfs()
1089 xfs_free_perag(mp); in xfs_unmountfs()
1091 xfs_errortag_del(mp); in xfs_unmountfs()
1092 xfs_error_sysfs_del(mp); in xfs_unmountfs()
1093 xfs_sysfs_del(&mp->m_stats.xs_kobj); in xfs_unmountfs()
1094 xfs_sysfs_del(&mp->m_kobj); in xfs_unmountfs()
1105 struct xfs_mount *mp, in xfs_fs_writable() argument
1109 if ((mp->m_super->s_writers.frozen >= level) || in xfs_fs_writable()
1110 xfs_is_shutdown(mp) || xfs_is_readonly(mp)) in xfs_fs_writable()
1119 struct xfs_mount *mp, in xfs_mod_freecounter() argument
1130 ASSERT(counter == &mp->m_fdblocks || counter == &mp->m_frextents); in xfs_mod_freecounter()
1131 has_resv_pool = (counter == &mp->m_fdblocks); in xfs_mod_freecounter()
1141 mp->m_resblks == mp->m_resblks_avail)) { in xfs_mod_freecounter()
1146 spin_lock(&mp->m_sb_lock); in xfs_mod_freecounter()
1147 res_used = (long long)(mp->m_resblks - mp->m_resblks_avail); in xfs_mod_freecounter()
1150 mp->m_resblks_avail += delta; in xfs_mod_freecounter()
1153 mp->m_resblks_avail = mp->m_resblks; in xfs_mod_freecounter()
1156 spin_unlock(&mp->m_sb_lock); in xfs_mod_freecounter()
1186 set_aside = xfs_fdblocks_unavailable(mp); in xfs_mod_freecounter()
1198 spin_lock(&mp->m_sb_lock); in xfs_mod_freecounter()
1203 lcounter = (long long)mp->m_resblks_avail + delta; in xfs_mod_freecounter()
1205 mp->m_resblks_avail = lcounter; in xfs_mod_freecounter()
1206 spin_unlock(&mp->m_sb_lock); in xfs_mod_freecounter()
1209 xfs_warn_once(mp, in xfs_mod_freecounter()
1213 spin_unlock(&mp->m_sb_lock); in xfs_mod_freecounter()
1222 struct xfs_mount *mp) in xfs_freesb() argument
1224 struct xfs_buf *bp = mp->m_sb_bp; in xfs_freesb()
1227 mp->m_sb_bp = NULL; in xfs_freesb()
1237 struct xfs_mount *mp, in xfs_dev_is_read_only() argument
1240 if (xfs_readonly_buftarg(mp->m_ddev_targp) || in xfs_dev_is_read_only()
1241 xfs_readonly_buftarg(mp->m_logdev_targp) || in xfs_dev_is_read_only()
1242 (mp->m_rtdev_targp && xfs_readonly_buftarg(mp->m_rtdev_targp))) { in xfs_dev_is_read_only()
1243 xfs_notice(mp, "%s required on read-only device.", message); in xfs_dev_is_read_only()
1244 xfs_notice(mp, "write access unavailable, cannot proceed."); in xfs_dev_is_read_only()
1253 struct xfs_mount *mp) in xfs_force_summary_recalc() argument
1255 if (!xfs_has_lazysbcount(mp)) in xfs_force_summary_recalc()
1258 xfs_fs_mark_sick(mp, XFS_SICK_FS_COUNTERS); in xfs_force_summary_recalc()
1267 struct xfs_mount *mp, in xfs_add_incompat_log_feature() argument
1282 error = xfs_log_force(mp, XFS_LOG_SYNC); in xfs_add_incompat_log_feature()
1285 xfs_ail_push_all(mp->m_ail); in xfs_add_incompat_log_feature()
1291 xfs_buf_lock(mp->m_sb_bp); in xfs_add_incompat_log_feature()
1292 xfs_buf_hold(mp->m_sb_bp); in xfs_add_incompat_log_feature()
1294 if (xfs_is_shutdown(mp)) { in xfs_add_incompat_log_feature()
1299 if (xfs_sb_has_incompat_log_feature(&mp->m_sb, feature)) in xfs_add_incompat_log_feature()
1307 dsb = mp->m_sb_bp->b_addr; in xfs_add_incompat_log_feature()
1308 xfs_sb_to_disk(dsb, &mp->m_sb); in xfs_add_incompat_log_feature()
1310 error = xfs_bwrite(mp->m_sb_bp); in xfs_add_incompat_log_feature()
1318 xfs_sb_add_incompat_log_features(&mp->m_sb, feature); in xfs_add_incompat_log_feature()
1319 xfs_buf_relse(mp->m_sb_bp); in xfs_add_incompat_log_feature()
1322 return xfs_sync_sb(mp, false); in xfs_add_incompat_log_feature()
1324 xfs_force_shutdown(mp, SHUTDOWN_META_IO_ERROR); in xfs_add_incompat_log_feature()
1326 xfs_buf_relse(mp->m_sb_bp); in xfs_add_incompat_log_feature()
1342 struct xfs_mount *mp) in xfs_clear_incompat_log_features() argument
1346 if (!xfs_has_crc(mp) || in xfs_clear_incompat_log_features()
1347 !xfs_sb_has_incompat_log_feature(&mp->m_sb, in xfs_clear_incompat_log_features()
1349 xfs_is_shutdown(mp)) in xfs_clear_incompat_log_features()
1357 xfs_buf_lock(mp->m_sb_bp); in xfs_clear_incompat_log_features()
1358 xfs_buf_hold(mp->m_sb_bp); in xfs_clear_incompat_log_features()
1360 if (xfs_sb_has_incompat_log_feature(&mp->m_sb, in xfs_clear_incompat_log_features()
1362 xfs_sb_remove_incompat_log_features(&mp->m_sb); in xfs_clear_incompat_log_features()
1366 xfs_buf_relse(mp->m_sb_bp); in xfs_clear_incompat_log_features()
1384 struct xfs_mount *mp, in xfs_mod_delalloc() argument
1387 percpu_counter_add_batch(&mp->m_delalloc_blks, delta, in xfs_mod_delalloc()