Home
last modified time | relevance | path

Searched refs:m_sb (Results 1 – 25 of 81) sorted by relevance

1234

/linux-6.1.9/fs/xfs/scrub/
Dagheader.c115 if (sb->sb_blocksize != cpu_to_be32(mp->m_sb.sb_blocksize)) in xchk_superblock()
118 if (sb->sb_dblocks != cpu_to_be64(mp->m_sb.sb_dblocks)) in xchk_superblock()
121 if (sb->sb_rblocks != cpu_to_be64(mp->m_sb.sb_rblocks)) in xchk_superblock()
124 if (sb->sb_rextents != cpu_to_be64(mp->m_sb.sb_rextents)) in xchk_superblock()
127 if (!uuid_equal(&sb->sb_uuid, &mp->m_sb.sb_uuid)) in xchk_superblock()
130 if (sb->sb_logstart != cpu_to_be64(mp->m_sb.sb_logstart)) in xchk_superblock()
133 if (sb->sb_rootino != cpu_to_be64(mp->m_sb.sb_rootino)) in xchk_superblock()
136 if (sb->sb_rbmino != cpu_to_be64(mp->m_sb.sb_rbmino)) in xchk_superblock()
139 if (sb->sb_rsumino != cpu_to_be64(mp->m_sb.sb_rsumino)) in xchk_superblock()
142 if (sb->sb_rextsize != cpu_to_be32(mp->m_sb.sb_rextsize)) in xchk_superblock()
[all …]
Drtbitmap.c52 startblock = rec->ar_startext * mp->m_sb.sb_rextsize; in xchk_rtbitmap_rec()
53 blockcount = rec->ar_extcount * mp->m_sb.sb_rextsize; in xchk_rtbitmap_rec()
71 for (off = 0; off < mp->m_sb.sb_rbmblocks;) { in xchk_rtbitmap_check_extents()
79 mp->m_sb.sb_rbmblocks - off, &map, &nmap, in xchk_rtbitmap_check_extents()
104 XFS_FSB_TO_B(sc->mp, sc->mp->m_sb.sb_rbmblocks)) { in xchk_rtbitmap()
181 do_div(startext, sc->mp->m_sb.sb_rextsize); in xchk_xref_is_used_rt_space()
182 do_div(endext, sc->mp->m_sb.sb_rextsize); in xchk_xref_is_used_rt_space()
Dquota.c107 if (dq->q_blk.hardlimit > mp->m_sb.sb_dblocks) in xchk_quota_item()
117 if (dq->q_rtb.hardlimit > mp->m_sb.sb_rblocks) in xchk_quota_item()
131 if (mp->m_sb.sb_dblocks < dq->q_blk.count) in xchk_quota_item()
135 if (mp->m_sb.sb_dblocks < dq->q_blk.count) in xchk_quota_item()
139 if (dq->q_ino.count > fs_icount || dq->q_rtb.count > mp->m_sb.sb_rblocks) in xchk_quota_item()
/linux-6.1.9/fs/xfs/libxfs/
Dxfs_trans_resv.c129 mp->m_sb.sb_inodesize + in xfs_calc_inode_res()
223 rtbmp_bytes = (XFS_MAX_BMBT_EXTLEN / mp->m_sb.sb_rextsize) / NBBY; in xfs_rtalloc_block_count()
265 return xfs_calc_buf_res(nr_ops, mp->m_sb.sb_sectsize) + in xfs_calc_refcountbt_reservation()
302 xfs_calc_buf_res(3, mp->m_sb.sb_sectsize) + in xfs_calc_write_reservation()
309 xfs_calc_buf_res(3, mp->m_sb.sb_sectsize) + in xfs_calc_write_reservation()
316 t3 = xfs_calc_buf_res(5, mp->m_sb.sb_sectsize) + in xfs_calc_write_reservation()
383 t2 = xfs_calc_buf_res(9, mp->m_sb.sb_sectsize) + in xfs_calc_itruncate_reservation()
387 t3 = xfs_calc_buf_res(5, mp->m_sb.sb_sectsize) + in xfs_calc_itruncate_reservation()
443 (xfs_calc_buf_res(7, mp->m_sb.sb_sectsize) + in xfs_calc_rename_reservation()
458 return xfs_calc_buf_res(1, mp->m_sb.sb_sectsize) + in xfs_calc_iunlink_remove_reservation()
[all …]
Dxfs_types.c48 if (agno >= mp->m_sb.sb_agcount) in xfs_verify_fsbno()
105 if (agno >= mp->m_sb.sb_agcount) in xfs_verify_ino()
118 return ino == mp->m_sb.sb_rbmino || ino == mp->m_sb.sb_rsumino || in xfs_internal_inum()
120 xfs_is_quota_inode(&mp->m_sb, ino)); in xfs_internal_inum()
146 return rtbno < mp->m_sb.sb_rblocks; in xfs_verify_rtbno()
Dxfs_ag.c112 struct xfs_sb *sbp = &mp->m_sb; in xfs_initialize_perag_data()
189 for (agno = 0; agno < mp->m_sb.sb_agcount; agno++) { in xfs_free_perag()
214 return mp->m_sb.sb_agblocks; in __xfs_ag_block_count()
215 return dblocks - (agno * mp->m_sb.sb_agblocks); in __xfs_ag_block_count()
223 return __xfs_ag_block_count(mp, agno, mp->m_sb.sb_agcount, in xfs_ag_block_count()
224 mp->m_sb.sb_dblocks); in xfs_ag_block_count()
413 mp->m_sb.sb_logstart); in xfs_freesp_init_recs()
437 be32_add_cpu(&arec->ar_startblock, mp->m_sb.sb_logblocks); in xfs_freesp_init_recs()
541 XFS_FSB_TO_AGBNO(mp, mp->m_sb.sb_logstart)); in xfs_rmaproot_init()
542 rrec->rm_blockcount = cpu_to_be32(mp->m_sb.sb_logblocks); in xfs_rmaproot_init()
[all …]
Dxfs_inode_buf.c51 ni = XFS_BB_TO_FSB(mp, bp->b_length) * mp->m_sb.sb_inopblock; in xfs_inode_buf_verify()
57 dip = xfs_buf_offset(bp, (i << mp->m_sb.sb_inodelog)); in xfs_inode_buf_verify()
340 uuid_copy(&to->di_uuid, &ip->i_mount->m_sb.sb_meta_uuid); in xfs_inode_to_disk()
476 if (!xfs_verify_cksum((char *)dip, mp->m_sb.sb_inodesize, in xfs_dinode_verify()
481 if (!uuid_equal(&dip->di_uuid, &mp->m_sb.sb_meta_uuid)) in xfs_dinode_verify()
513 if (mode && XFS_DFORK_BOFF(dip) > mp->m_sb.sb_inodesize) in xfs_dinode_verify()
621 crc = xfs_start_cksum_update((char *)dip, mp->m_sb.sb_inodesize, in xfs_dinode_calc_crc()
686 blocksize_bytes = XFS_FSB_TO_B(mp, mp->m_sb.sb_rextsize); in xfs_inode_validate_extsize()
688 blocksize_bytes = mp->m_sb.sb_blocksize; in xfs_inode_validate_extsize()
712 if (!rt_flag && extsize > mp->m_sb.sb_agblocks / 2) in xfs_inode_validate_extsize()
[all …]
Dxfs_ialloc.c319 mp->m_sb.sb_inodesize, length, gen); in xfs_ialloc_inode_init()
339 int ioffset = i << mp->m_sb.sb_inodelog; in xfs_ialloc_inode_init()
351 &mp->m_sb.sb_meta_uuid); in xfs_ialloc_inode_init()
422 mod = agbno % mp->m_sb.sb_inoalignmt; in xfs_align_sparse_ino()
763 args.alignment = args.mp->m_sb.sb_spino_align; in xfs_ialloc_ag_alloc()
779 args.min_agbno = args.mp->m_sb.sb_inoalignmt; in xfs_ialloc_ag_alloc()
780 args.max_agbno = round_down(args.mp->m_sb.sb_agblocks, in xfs_ialloc_ag_alloc()
781 args.mp->m_sb.sb_inoalignmt) - in xfs_ialloc_ag_alloc()
1868 mp->m_sb.sb_inopblock; in xfs_difree_inode_chunk()
1871 mp->m_sb.sb_inopblock; in xfs_difree_inode_chunk()
[all …]
Dxfs_dir2.c103 ASSERT(mp->m_sb.sb_versionnum & XFS_SB_VERSION_DIRV2BIT); in xfs_da_mount()
104 ASSERT(xfs_dir2_dirblock_bytes(&mp->m_sb) <= XFS_MAX_BLOCKSIZE); in xfs_da_mount()
118 dageo->blklog = mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog; in xfs_da_mount()
119 dageo->fsblog = mp->m_sb.sb_blocklog; in xfs_da_mount()
120 dageo->blksize = xfs_dir2_dirblock_bytes(&mp->m_sb); in xfs_da_mount()
121 dageo->fsbcount = 1 << mp->m_sb.sb_dirblklog; in xfs_da_mount()
154 mp->m_sb.sb_blocklog; in xfs_da_mount()
159 dageo->blklog = mp->m_sb.sb_blocklog; in xfs_da_mount()
160 dageo->fsblog = mp->m_sb.sb_blocklog; in xfs_da_mount()
Dxfs_format.h459 #define XFS_FSB_TO_B(mp,fsbno) ((xfs_fsize_t)(fsbno) << (mp)->m_sb.sb_blocklog)
461 ((((uint64_t)(b)) + (mp)->m_blockmask) >> (mp)->m_sb.sb_blocklog)
462 #define XFS_B_TO_FSBT(mp,b) (((uint64_t)(b)) >> (mp)->m_sb.sb_blocklog)
672 (((xfs_fsblock_t)(agno) << (mp)->m_sb.sb_agblklog) | (agbno))
674 ((xfs_agnumber_t)((fsbno) >> (mp)->m_sb.sb_agblklog))
676 ((xfs_agblock_t)((fsbno) & xfs_mask32lo((mp)->m_sb.sb_agblklog)))
679 (xfs_fsblock_t)(agno) * (mp)->m_sb.sb_agblocks + (agbno)))
972 ((mp)->m_sb.sb_inodesize - XFS_DINODE_SIZE(mp))
1104 #define XFS_INO_OFFSET_BITS(mp) (mp)->m_sb.sb_inopblog
1105 #define XFS_INO_AGBNO_BITS(mp) (mp)->m_sb.sb_agblklog
[all …]
Dxfs_ag.h180 return mp->m_sb.sb_logstart > 0 && in xfs_ag_contains_log()
181 agno == XFS_FSB_TO_AGNO(mp, mp->m_sb.sb_logstart); in xfs_ag_contains_log()
208 for_each_perag_range((mp), (agno), (mp)->m_sb.sb_agcount - 1, (pag))
Dxfs_symlink_remote.c30 int buflen = XFS_SYMLINK_BUF_SPACE(mp, mp->m_sb.sb_blocksize); in xfs_symlink_blocks()
52 uuid_copy(&dsl->sl_uuid, &mp->m_sb.sb_meta_uuid); in xfs_symlink_hdr_set()
96 if (!uuid_equal(&dsl->sl_uuid, &mp->m_sb.sb_meta_uuid)) in xfs_symlink_verify()
/linux-6.1.9/fs/xfs/
Dxfs_mount.c60 uuid_t *uuid = &mp->m_sb.sb_uuid; in xfs_uuid_mount()
105 uuid_t *uuid = &mp->m_sb.sb_uuid; in xfs_uuid_unmount()
154 struct xfs_sb *sbp = &mp->m_sb; in xfs_readsb()
256 struct xfs_sb *sbp = &mp->m_sb; in xfs_check_new_dalign()
301 mp->m_sb.sb_blocksize); in xfs_validate_new_dalign()
309 if (mp->m_dalign && (mp->m_sb.sb_agblocks % mp->m_dalign)) { in xfs_validate_new_dalign()
312 mp->m_sb.sb_agblocks); in xfs_validate_new_dalign()
319 mp->m_dalign, mp->m_sb.sb_blocksize); in xfs_validate_new_dalign()
339 struct xfs_sb *sbp = &mp->m_sb; in xfs_update_alignment()
371 uint64_t dblocks = mp->m_sb.sb_dblocks; in xfs_set_low_space_thresholds()
[all …]
Dxfs_fsops.c48 xfs_rfsblock_t nb = mp->m_sb.sb_dblocks + delta; in xfs_resizefs_init_new_ags()
60 (xfs_rfsblock_t)mp->m_sb.sb_agblocks); in xfs_resizefs_init_new_ags()
62 id->agsize = mp->m_sb.sb_agblocks; in xfs_resizefs_init_new_ags()
103 error = xfs_sb_validate_fsb_count(&mp->m_sb, nb); in xfs_growfs_data_private()
107 if (nb > mp->m_sb.sb_dblocks) { in xfs_growfs_data_private()
117 nb_mod = do_div(nb_div, mp->m_sb.sb_agblocks); in xfs_growfs_data_private()
121 nb = (xfs_rfsblock_t)nagcount * mp->m_sb.sb_agblocks; in xfs_growfs_data_private()
123 delta = nb - mp->m_sb.sb_dblocks; in xfs_growfs_data_private()
132 oagcount = mp->m_sb.sb_agcount; in xfs_growfs_data_private()
234 if (nb == mp->m_sb.sb_logblocks && in xfs_growfs_log_private()
[all …]
Dxfs_qm_syscalls.c45 mp->m_sb.sb_qflags = mp->m_qflags; in xfs_qm_scall_quotaoff()
116 error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_uquotino); in xfs_qm_scall_trunc_qfiles()
121 error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_gquotino); in xfs_qm_scall_trunc_qfiles()
126 error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_pquotino); in xfs_qm_scall_trunc_qfiles()
161 if (((mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon()
163 ((mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon()
165 ((mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon()
169 __func__, flags, mp->m_sb.sb_qflags); in xfs_qm_scall_quotaon()
183 qf = mp->m_sb.sb_qflags; in xfs_qm_scall_quotaon()
184 mp->m_sb.sb_qflags = qf | flags; in xfs_qm_scall_quotaon()
[all …]
Dxfs_rtalloc.c115 for (bbno = omp->m_sb.sb_rbmblocks - 1; in xfs_rtcopy_summary()
168 error = xfs_rtfind_forw(mp, tp, end, mp->m_sb.sb_rextents - 1, in xfs_rtallocate_range()
251 maxlen = min(mp->m_sb.sb_rextents, i + maxlen) - i; in xfs_rtallocate_extent_block()
446 if (bno >= mp->m_sb.sb_rextents) in xfs_rtallocate_extent_near()
447 bno = mp->m_sb.sb_rextents - 1; in xfs_rtallocate_extent_near()
450 maxlen = min(mp->m_sb.sb_rextents, bno + maxlen) - bno; in xfs_rtallocate_extent_near()
593 else if (i > 0 && (int)bbno + i < mp->m_sb.sb_rbmblocks - 1) in xfs_rtallocate_extent_near()
599 else if (i <= 0 && (int)bbno - i < mp->m_sb.sb_rbmblocks - 1) in xfs_rtallocate_extent_near()
655 for (i = 0; i < mp->m_sb.sb_rbmblocks; i++) { in xfs_rtallocate_extent_size()
714 for (i = 0; i < mp->m_sb.sb_rbmblocks; i++) { in xfs_rtallocate_extent_size()
[all …]
Dxfs_qm.c302 if (xfs_is_quota_inode(&mp->m_sb, ip->i_ino)) in xfs_qm_need_dqattach()
390 ASSERT(!xfs_is_quota_inode(&ip->i_mount->m_sb, ip->i_ino)); in xfs_qm_dqdetach()
662 mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_CHKD); in xfs_qm_init_quotainfo()
749 (mp->m_sb.sb_gquotino != NULLFSINO)) { in xfs_qm_qino_alloc()
750 ino = mp->m_sb.sb_gquotino; in xfs_qm_qino_alloc()
752 mp->m_sb.sb_pquotino != NULLFSINO)) in xfs_qm_qino_alloc()
755 (mp->m_sb.sb_pquotino != NULLFSINO)) { in xfs_qm_qino_alloc()
756 ino = mp->m_sb.sb_pquotino; in xfs_qm_qino_alloc()
758 mp->m_sb.sb_gquotino != NULLFSINO)) in xfs_qm_qino_alloc()
765 mp->m_sb.sb_gquotino = NULLFSINO; in xfs_qm_qino_alloc()
[all …]
Dxfs_qm_bhv.c79 (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_ACCT); in xfs_qm_newmount()
82 uquotaondisk = mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT; in xfs_qm_newmount()
83 pquotaondisk = mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT; in xfs_qm_newmount()
84 gquotaondisk = mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT; in xfs_qm_newmount()
Dxfs_icreate_item.c173 if (agno >= mp->m_sb.sb_agcount) { in xlog_recover_icreate_commit_pass2()
178 if (!agbno || agbno == NULLAGBLOCK || agbno >= mp->m_sb.sb_agblocks) { in xlog_recover_icreate_commit_pass2()
183 if (isize != mp->m_sb.sb_inodesize) { in xlog_recover_icreate_commit_pass2()
193 if (!length || length >= mp->m_sb.sb_agblocks) { in xlog_recover_icreate_commit_pass2()
210 if ((count >> mp->m_sb.sb_inopblog) != length) { in xlog_recover_icreate_commit_pass2()
Dxfs_super.c272 xfs_sb_t *sbp = &mp->m_sb; in xfs_set_inode_alloc()
500 error = xfs_setsize_buftarg(mp->m_ddev_targp, mp->m_sb.sb_sectsize); in xfs_setup_devices()
508 log_sector_size = mp->m_sb.sb_logsectsize; in xfs_setup_devices()
516 mp->m_sb.sb_sectsize); in xfs_setup_devices()
800 xfs_sb_t *sbp = &mp->m_sb; in xfs_fs_statfs()
966 mp->m_sb.sb_logsunit > XLOG_BIG_RECORD_BSIZE) { in xfs_finish_flags()
967 mp->m_logbsize = mp->m_sb.sb_logsunit; in xfs_finish_flags()
969 mp->m_logbsize < mp->m_sb.sb_logsunit) { in xfs_finish_flags()
995 if ((mp->m_sb.sb_flags & XFS_SBF_READONLY) && !xfs_is_readonly(mp)) { in xfs_finish_flags()
1055 percpu_counter_set(&mp->m_icount, mp->m_sb.sb_icount); in xfs_reinit_percpu_counters()
[all …]
Dxfs_discard.c187 if (range.start >= XFS_FSB_TO_B(mp, mp->m_sb.sb_dblocks) || in xfs_ioc_trim()
189 range.len < mp->m_sb.sb_blocksize) in xfs_ioc_trim()
195 if (end > XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks) - 1) in xfs_ioc_trim()
196 end = XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks)- 1; in xfs_ioc_trim()
Dxfs_trans.c518 mp->m_sb.sb_frextents += rtxdelta; in xfs_trans_apply_sb_deltas()
643 mp->m_sb.sb_fdblocks += tp->t_fdblocks_delta + tp->t_res_fdblocks_delta; in xfs_trans_unreserve_and_mod_sb()
644 mp->m_sb.sb_icount += idelta; in xfs_trans_unreserve_and_mod_sb()
645 mp->m_sb.sb_ifree += ifreedelta; in xfs_trans_unreserve_and_mod_sb()
652 mp->m_sb.sb_dblocks += tp->t_dblocks_delta; in xfs_trans_unreserve_and_mod_sb()
653 mp->m_sb.sb_agcount += tp->t_agcount_delta; in xfs_trans_unreserve_and_mod_sb()
654 mp->m_sb.sb_imax_pct += tp->t_imaxpct_delta; in xfs_trans_unreserve_and_mod_sb()
655 mp->m_sb.sb_rextsize += tp->t_rextsize_delta; in xfs_trans_unreserve_and_mod_sb()
656 mp->m_sb.sb_rbmblocks += tp->t_rbmblocks_delta; in xfs_trans_unreserve_and_mod_sb()
657 mp->m_sb.sb_rblocks += tp->t_rblocks_delta; in xfs_trans_unreserve_and_mod_sb()
[all …]
Dxfs_bmap_util.c84 xfs_extlen_t minlen = mp->m_sb.sb_rextsize; in xfs_bmap_rtalloc()
92 prod = align / mp->m_sb.sb_rextsize; in xfs_bmap_rtalloc()
99 ASSERT(ap->length % mp->m_sb.sb_rextsize == 0); in xfs_bmap_rtalloc()
120 ralen = ap->length / mp->m_sb.sb_rextsize; in xfs_bmap_rtalloc()
128 if (ralen * mp->m_sb.sb_rextsize >= XFS_MAX_BMBT_EXTLEN) in xfs_bmap_rtalloc()
129 ralen = XFS_MAX_BMBT_EXTLEN / mp->m_sb.sb_rextsize; in xfs_bmap_rtalloc()
152 ap->blkno = rtx * mp->m_sb.sb_rextsize; in xfs_bmap_rtalloc()
165 do_div(ap->blkno, mp->m_sb.sb_rextsize); in xfs_bmap_rtalloc()
168 raminlen = max_t(xfs_extlen_t, 1, minlen / mp->m_sb.sb_rextsize); in xfs_bmap_rtalloc()
175 ap->blkno = rtb * mp->m_sb.sb_rextsize; in xfs_bmap_rtalloc()
[all …]
Dxfs_filestream.c115 minfree = mp->m_sb.sb_agblocks / 50; in xfs_filestream_pick_ag()
177 if (++ag >= mp->m_sb.sb_agcount) in xfs_filestream_pick_ag()
301 startag = (mp->m_agfrotor / rotorstep) % mp->m_sb.sb_agcount; in xfs_filestream_lookup_ag()
303 (mp->m_sb.sb_agcount * rotorstep); in xfs_filestream_lookup_ag()
343 startag = (item->ag + 1) % mp->m_sb.sb_agcount; in xfs_filestream_new_ag()
Dxfs_quota.h34 (mp->m_sb.sb_qflags & XFS_UQUOTA_CHKD) == 0) || \
36 (mp->m_sb.sb_qflags & XFS_GQUOTA_CHKD) == 0) || \
38 (mp->m_sb.sb_qflags & XFS_PQUOTA_CHKD) == 0))

1234