Lines Matching refs:mp

754 	struct xfs_mount *mp = tp->t_mountp;  in xfs_ialloc()  local
780 error = xfs_iget(mp, tp, ino, XFS_IGET_CREATE, in xfs_ialloc()
825 tv = current_fs_time(mp->m_super); in xfs_ialloc()
841 ASSERT(uuid_equal(&ip->i_d.di_uuid, &mp->m_sb.sb_meta_uuid)); in xfs_ialloc()
1139 struct xfs_mount *mp = dp->i_mount; in xfs_create() local
1156 if (XFS_FORCED_SHUTDOWN(mp)) in xfs_create()
1173 resblks = XFS_MKDIR_SPACE_RES(mp, name->len); in xfs_create()
1174 tres = &M_RES(mp)->tr_mkdir; in xfs_create()
1175 tp = xfs_trans_alloc(mp, XFS_TRANS_MKDIR); in xfs_create()
1177 resblks = XFS_CREATE_SPACE_RES(mp, name->len); in xfs_create()
1178 tres = &M_RES(mp)->tr_create; in xfs_create()
1179 tp = xfs_trans_alloc(mp, XFS_TRANS_CREATE); in xfs_create()
1191 xfs_flush_inodes(mp); in xfs_create()
1212 error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, in xfs_create()
1245 resblks - XFS_IALLOC_SPACE_RES(mp) : 0); in xfs_create()
1268 if (mp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) in xfs_create()
1324 struct xfs_mount *mp = dp->i_mount; in xfs_create_tmpfile() local
1335 if (XFS_FORCED_SHUTDOWN(mp)) in xfs_create_tmpfile()
1350 resblks = XFS_IALLOC_SPACE_RES(mp); in xfs_create_tmpfile()
1351 tp = xfs_trans_alloc(mp, XFS_TRANS_CREATE_TMPFILE); in xfs_create_tmpfile()
1353 tres = &M_RES(mp)->tr_create_tmpfile; in xfs_create_tmpfile()
1363 error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, in xfs_create_tmpfile()
1373 if (mp->m_flags & XFS_MOUNT_WSYNC) in xfs_create_tmpfile()
1425 xfs_mount_t *mp = tdp->i_mount; in xfs_link() local
1437 if (XFS_FORCED_SHUTDOWN(mp)) in xfs_link()
1448 tp = xfs_trans_alloc(mp, XFS_TRANS_LINK); in xfs_link()
1449 resblks = XFS_LINK_SPACE_RES(mp, target_name->len); in xfs_link()
1450 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_link, resblks, 0); in xfs_link()
1453 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_link, 0, 0); in xfs_link()
1505 if (mp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) { in xfs_link()
1551 struct xfs_mount *mp = ip->i_mount; in xfs_itruncate_extents() local
1569 ASSERT(!XFS_NOT_DQATTACHED(mp, ip)); in xfs_itruncate_extents()
1582 first_unmap_block = XFS_B_TO_FSB(mp, (xfs_ufsize_t)new_size); in xfs_itruncate_extents()
1583 last_block = XFS_B_TO_FSB(mp, mp->m_super->s_maxbytes); in xfs_itruncate_extents()
1640 xfs_mount_t *mp = ip->i_mount; in xfs_release() local
1647 if (mp->m_flags & XFS_MOUNT_RDONLY) in xfs_release()
1650 if (!XFS_FORCED_SHUTDOWN(mp)) { in xfs_release()
1703 error = xfs_free_eofblocks(mp, ip, true); in xfs_release()
1723 struct xfs_mount *mp = ip->i_mount; in xfs_inactive_truncate() local
1727 tp = xfs_trans_alloc(mp, XFS_TRANS_INACTIVE); in xfs_inactive_truncate()
1728 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_itruncate, 0, 0); in xfs_inactive_truncate()
1730 ASSERT(XFS_FORCED_SHUTDOWN(mp)); in xfs_inactive_truncate()
1778 struct xfs_mount *mp = ip->i_mount; in xfs_inactive_ifree() local
1782 tp = xfs_trans_alloc(mp, XFS_TRANS_INACTIVE); in xfs_inactive_ifree()
1800 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_ifree, in xfs_inactive_ifree()
1801 XFS_IFREE_SPACE_RES(mp), 0); in xfs_inactive_ifree()
1804 xfs_warn_ratelimited(mp, in xfs_inactive_ifree()
1808 ASSERT(XFS_FORCED_SHUTDOWN(mp)); in xfs_inactive_ifree()
1825 if (!XFS_FORCED_SHUTDOWN(mp)) { in xfs_inactive_ifree()
1826 xfs_notice(mp, "%s: xfs_ifree returned error %d", in xfs_inactive_ifree()
1828 xfs_force_shutdown(mp, SHUTDOWN_META_IO_ERROR); in xfs_inactive_ifree()
1846 xfs_notice(mp, "%s: xfs_bmap_finish returned error %d", in xfs_inactive_ifree()
1852 xfs_notice(mp, "%s: xfs_trans_commit returned error %d", in xfs_inactive_ifree()
1871 struct xfs_mount *mp; in xfs_inactive() local
1885 mp = ip->i_mount; in xfs_inactive()
1888 if (mp->m_flags & XFS_MOUNT_RDONLY) in xfs_inactive()
1898 xfs_free_eofblocks(mp, ip, false); in xfs_inactive()
1957 xfs_mount_t *mp; in xfs_iunlink() local
1970 mp = tp->t_mountp; in xfs_iunlink()
1976 error = xfs_read_agi(mp, tp, XFS_INO_TO_AGNO(mp, ip->i_ino), &agibp); in xfs_iunlink()
1985 agino = XFS_INO_TO_AGINO(mp, ip->i_ino); in xfs_iunlink()
1998 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, in xfs_iunlink()
2009 xfs_dinode_calc_crc(mp, dip); in xfs_iunlink()
2014 xfs_inobp_check(mp, ibp); in xfs_iunlink()
2039 xfs_mount_t *mp; in xfs_iunlink_remove() local
2053 mp = tp->t_mountp; in xfs_iunlink_remove()
2054 agno = XFS_INO_TO_AGNO(mp, ip->i_ino); in xfs_iunlink_remove()
2060 error = xfs_read_agi(mp, tp, agno, &agibp); in xfs_iunlink_remove()
2070 agino = XFS_INO_TO_AGINO(mp, ip->i_ino); in xfs_iunlink_remove()
2084 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, in xfs_iunlink_remove()
2087 xfs_warn(mp, "%s: xfs_imap_to_bp returned error %d.", in xfs_iunlink_remove()
2099 xfs_dinode_calc_crc(mp, dip); in xfs_iunlink_remove()
2104 xfs_inobp_check(mp, ibp); in xfs_iunlink_remove()
2132 next_ino = XFS_AGINO_TO_INO(mp, agno, next_agino); in xfs_iunlink_remove()
2134 error = xfs_imap(mp, tp, next_ino, &imap, 0); in xfs_iunlink_remove()
2136 xfs_warn(mp, in xfs_iunlink_remove()
2142 error = xfs_imap_to_bp(mp, tp, &imap, &last_dip, in xfs_iunlink_remove()
2145 xfs_warn(mp, in xfs_iunlink_remove()
2161 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, in xfs_iunlink_remove()
2164 xfs_warn(mp, "%s: xfs_imap_to_bp(2) returned error %d.", in xfs_iunlink_remove()
2177 xfs_dinode_calc_crc(mp, dip); in xfs_iunlink_remove()
2182 xfs_inobp_check(mp, ibp); in xfs_iunlink_remove()
2194 xfs_dinode_calc_crc(mp, last_dip); in xfs_iunlink_remove()
2199 xfs_inobp_check(mp, last_ibp); in xfs_iunlink_remove()
2215 xfs_mount_t *mp = free_ip->i_mount; in xfs_ifree_cluster() local
2230 pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, inum)); in xfs_ifree_cluster()
2231 blks_per_cluster = xfs_icluster_size_fsb(mp); in xfs_ifree_cluster()
2232 inodes_per_cluster = blks_per_cluster << mp->m_sb.sb_inopblog; in xfs_ifree_cluster()
2233 nbufs = mp->m_ialloc_blks / blks_per_cluster; in xfs_ifree_cluster()
2247 blkno = XFS_AGB_TO_DADDR(mp, XFS_INO_TO_AGNO(mp, inum), in xfs_ifree_cluster()
2248 XFS_INO_TO_AGBNO(mp, inum)); in xfs_ifree_cluster()
2258 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno, in xfs_ifree_cluster()
2259 mp->m_bsize * blks_per_cluster, in xfs_ifree_cluster()
2289 xfs_trans_ail_copy_lsn(mp->m_ail, in xfs_ifree_cluster()
2312 XFS_INO_TO_AGINO(mp, (inum + i))); in xfs_ifree_cluster()
2370 xfs_trans_ail_copy_lsn(mp->m_ail, &iip->ili_flush_lsn, in xfs_ifree_cluster()
2520 xfs_mount_t *mp = dp->i_mount; in xfs_remove() local
2531 if (XFS_FORCED_SHUTDOWN(mp)) in xfs_remove()
2543 tp = xfs_trans_alloc(mp, XFS_TRANS_RMDIR); in xfs_remove()
2545 tp = xfs_trans_alloc(mp, XFS_TRANS_REMOVE); in xfs_remove()
2556 resblks = XFS_REMOVE_SPACE_RES(mp); in xfs_remove()
2557 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_remove, resblks, 0); in xfs_remove()
2560 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_remove, 0, 0); in xfs_remove()
2624 if (mp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) in xfs_remove()
2893 struct xfs_mount *mp = src_dp->i_mount; in xfs_rename() local
2928 tp = xfs_trans_alloc(mp, XFS_TRANS_RENAME); in xfs_rename()
2929 spaceres = XFS_RENAME_SPACE_RES(mp, target_name->len); in xfs_rename()
2930 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_rename, spaceres, 0); in xfs_rename()
2933 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_rename, 0, 0); in xfs_rename()
3183 xfs_mount_t *mp = ip->i_mount; in xfs_iflush_cluster() local
3195 pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, ip->i_ino)); in xfs_iflush_cluster()
3197 inodes_per_cluster = mp->m_inode_cluster_size >> mp->m_sb.sb_inodelog; in xfs_iflush_cluster()
3203 mask = ~(((mp->m_inode_cluster_size >> mp->m_sb.sb_inodelog)) - 1); in xfs_iflush_cluster()
3204 first_index = XFS_INO_TO_AGINO(mp, ip->i_ino) & mask; in xfs_iflush_cluster()
3226 (XFS_INO_TO_AGINO(mp, iq->i_ino) & mask) != first_index) { in xfs_iflush_cluster()
3276 XFS_STATS_INC(mp, xs_icluster_flushcnt); in xfs_iflush_cluster()
3277 XFS_STATS_ADD(mp, xs_icluster_flushinode, clcount); in xfs_iflush_cluster()
3303 xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); in xfs_iflush_cluster()
3345 struct xfs_mount *mp = ip->i_mount; in xfs_iflush() local
3350 XFS_STATS_INC(mp, xs_iflush_count); in xfs_iflush()
3382 if (XFS_FORCED_SHUTDOWN(mp)) { in xfs_iflush()
3396 error = xfs_imap_to_bp(mp, NULL, &ip->i_imap, &dip, &bp, XBF_TRYLOCK, in xfs_iflush()
3417 xfs_log_force(mp, 0); in xfs_iflush()
3433 xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); in xfs_iflush()
3451 struct xfs_mount *mp = ip->i_mount; in xfs_iflush_int() local
3464 mp, XFS_ERRTAG_IFLUSH_1, XFS_RANDOM_IFLUSH_1)) { in xfs_iflush_int()
3465 xfs_alert_tag(mp, XFS_PTAG_IFLUSH, in xfs_iflush_int()
3471 mp, XFS_ERRTAG_IFLUSH_2, XFS_RANDOM_IFLUSH_2)) { in xfs_iflush_int()
3472 xfs_alert_tag(mp, XFS_PTAG_IFLUSH, in xfs_iflush_int()
3481 mp, XFS_ERRTAG_IFLUSH_3, XFS_RANDOM_IFLUSH_3)) { in xfs_iflush_int()
3482 xfs_alert_tag(mp, XFS_PTAG_IFLUSH, in xfs_iflush_int()
3492 mp, XFS_ERRTAG_IFLUSH_4, XFS_RANDOM_IFLUSH_4)) { in xfs_iflush_int()
3493 xfs_alert_tag(mp, XFS_PTAG_IFLUSH, in xfs_iflush_int()
3500 ip->i_d.di_nblocks, mp, XFS_ERRTAG_IFLUSH_5, in xfs_iflush_int()
3502 xfs_alert_tag(mp, XFS_PTAG_IFLUSH, in xfs_iflush_int()
3510 if (XFS_TEST_ERROR(ip->i_d.di_forkoff > mp->m_sb.sb_inodesize, in xfs_iflush_int()
3511 mp, XFS_ERRTAG_IFLUSH_6, XFS_RANDOM_IFLUSH_6)) { in xfs_iflush_int()
3512 xfs_alert_tag(mp, XFS_PTAG_IFLUSH, in xfs_iflush_int()
3545 xfs_inobp_check(mp, bp); in xfs_iflush_int()
3577 xfs_trans_ail_copy_lsn(mp->m_ail, &iip->ili_flush_lsn, in xfs_iflush_int()
3593 xfs_dinode_calc_crc(mp, dip); in xfs_iflush_int()