Home
last modified time | relevance | path

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

1234

/Linux-v5.15/fs/xfs/
Dxfs_mount.c59 uuid_t *uuid = &mp->m_sb.sb_uuid; in xfs_uuid_mount()
104 uuid_t *uuid = &mp->m_sb.sb_uuid; in xfs_uuid_unmount()
153 struct xfs_sb *sbp = &mp->m_sb; in xfs_readsb()
255 struct xfs_sb *sbp = &mp->m_sb; in xfs_check_new_dalign()
300 mp->m_sb.sb_blocksize); in xfs_validate_new_dalign()
307 if (mp->m_dalign && (mp->m_sb.sb_agblocks % mp->m_dalign)) { in xfs_validate_new_dalign()
310 mp->m_sb.sb_agblocks); in xfs_validate_new_dalign()
317 mp->m_dalign, mp->m_sb.sb_blocksize); in xfs_validate_new_dalign()
336 struct xfs_sb *sbp = &mp->m_sb; in xfs_update_alignment()
368 uint64_t dblocks = mp->m_sb.sb_dblocks; in xfs_set_low_space_thresholds()
[all …]
Dxfs_fsops.c46 xfs_rfsblock_t nb = mp->m_sb.sb_dblocks + delta; in xfs_resizefs_init_new_ags()
58 (xfs_rfsblock_t)mp->m_sb.sb_agblocks); in xfs_resizefs_init_new_ags()
60 id->agsize = mp->m_sb.sb_agblocks; in xfs_resizefs_init_new_ags()
100 error = xfs_sb_validate_fsb_count(&mp->m_sb, nb); in xfs_growfs_data_private()
104 if (nb > mp->m_sb.sb_dblocks) { in xfs_growfs_data_private()
114 nb_mod = do_div(nb_div, mp->m_sb.sb_agblocks); in xfs_growfs_data_private()
118 nb = (xfs_rfsblock_t)nagcount * mp->m_sb.sb_agblocks; in xfs_growfs_data_private()
120 delta = nb - mp->m_sb.sb_dblocks; in xfs_growfs_data_private()
129 oagcount = mp->m_sb.sb_agcount; in xfs_growfs_data_private()
235 if (nb == mp->m_sb.sb_logblocks && in xfs_growfs_log_private()
[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_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_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()
671 mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_CHKD); in xfs_qm_init_quotainfo()
757 (mp->m_sb.sb_gquotino != NULLFSINO)) { in xfs_qm_qino_alloc()
758 ino = mp->m_sb.sb_gquotino; in xfs_qm_qino_alloc()
760 mp->m_sb.sb_pquotino != NULLFSINO)) in xfs_qm_qino_alloc()
763 (mp->m_sb.sb_pquotino != NULLFSINO)) { in xfs_qm_qino_alloc()
764 ino = mp->m_sb.sb_pquotino; in xfs_qm_qino_alloc()
766 mp->m_sb.sb_gquotino != NULLFSINO)) in xfs_qm_qino_alloc()
773 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.c172 if (agno >= mp->m_sb.sb_agcount) { in xlog_recover_icreate_commit_pass2()
177 if (!agbno || agbno == NULLAGBLOCK || agbno >= mp->m_sb.sb_agblocks) { in xlog_recover_icreate_commit_pass2()
182 if (isize != mp->m_sb.sb_inodesize) { in xlog_recover_icreate_commit_pass2()
192 if (!length || length >= mp->m_sb.sb_agblocks) { in xlog_recover_icreate_commit_pass2()
209 if ((count >> mp->m_sb.sb_inopblog) != length) { in xlog_recover_icreate_commit_pass2()
Dxfs_trans.c622 mp->m_sb.sb_fdblocks += tp->t_fdblocks_delta + tp->t_res_fdblocks_delta; in xfs_trans_unreserve_and_mod_sb()
623 mp->m_sb.sb_icount += idelta; in xfs_trans_unreserve_and_mod_sb()
624 mp->m_sb.sb_ifree += ifreedelta; in xfs_trans_unreserve_and_mod_sb()
625 mp->m_sb.sb_frextents += rtxdelta; in xfs_trans_unreserve_and_mod_sb()
626 mp->m_sb.sb_dblocks += tp->t_dblocks_delta; in xfs_trans_unreserve_and_mod_sb()
627 mp->m_sb.sb_agcount += tp->t_agcount_delta; in xfs_trans_unreserve_and_mod_sb()
628 mp->m_sb.sb_imax_pct += tp->t_imaxpct_delta; in xfs_trans_unreserve_and_mod_sb()
629 mp->m_sb.sb_rextsize += tp->t_rextsize_delta; in xfs_trans_unreserve_and_mod_sb()
630 mp->m_sb.sb_rbmblocks += tp->t_rbmblocks_delta; in xfs_trans_unreserve_and_mod_sb()
631 mp->m_sb.sb_rblocks += tp->t_rblocks_delta; in xfs_trans_unreserve_and_mod_sb()
[all …]
Dxfs_super.c268 xfs_sb_t *sbp = &mp->m_sb; in xfs_set_inode_alloc()
489 error = xfs_setsize_buftarg(mp->m_ddev_targp, mp->m_sb.sb_sectsize); in xfs_setup_devices()
497 log_sector_size = mp->m_sb.sb_logsectsize; in xfs_setup_devices()
505 mp->m_sb.sb_sectsize); in xfs_setup_devices()
779 xfs_sb_t *sbp = &mp->m_sb; in xfs_fs_statfs()
939 mp->m_sb.sb_logsunit > XLOG_BIG_RECORD_BSIZE) { in xfs_finish_flags()
940 mp->m_logbsize = mp->m_sb.sb_logsunit; in xfs_finish_flags()
942 mp->m_logbsize < mp->m_sb.sb_logsunit) { in xfs_finish_flags()
968 if ((mp->m_sb.sb_flags & XFS_SBF_READONLY) && !xfs_is_readonly(mp)) { in xfs_finish_flags()
1022 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_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 >= MAXEXTLEN) in xfs_bmap_rtalloc()
129 ralen = MAXEXTLEN / 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()
176 if (++ag >= mp->m_sb.sb_agcount) in xfs_filestream_pick_ag()
300 startag = (mp->m_agfrotor / rotorstep) % mp->m_sb.sb_agcount; in xfs_filestream_lookup_ag()
302 (mp->m_sb.sb_agcount * rotorstep); in xfs_filestream_lookup_ag()
342 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))
/Linux-v5.15/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.c51 startblock = rec->ar_startext * tp->t_mountp->m_sb.sb_rextsize; in xchk_rtbitmap_rec()
52 blockcount = rec->ar_extcount * tp->t_mountp->m_sb.sb_rextsize; in xchk_rtbitmap_rec()
70 for (off = 0; off < mp->m_sb.sb_rbmblocks;) { in xchk_rtbitmap_check_extents()
78 mp->m_sb.sb_rbmblocks - off, &map, &nmap, in xchk_rtbitmap_check_extents()
103 XFS_FSB_TO_B(sc->mp, sc->mp->m_sb.sb_rbmblocks)) { in xchk_rtbitmap()
180 do_div(startext, sc->mp->m_sb.sb_rextsize); in xchk_xref_is_used_rt_space()
181 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-v5.15/fs/xfs/libxfs/
Dxfs_trans_resv.c119 mp->m_sb.sb_inodesize + in xfs_calc_inode_res()
213 rtbmp_bytes = (MAXEXTLEN / mp->m_sb.sb_rextsize) / NBBY; in xfs_rtalloc_log_count()
268 xfs_calc_buf_res(3, mp->m_sb.sb_sectsize) + in xfs_calc_write_reservation()
275 xfs_calc_buf_res(3, mp->m_sb.sb_sectsize) + in xfs_calc_write_reservation()
282 t3 = xfs_calc_buf_res(5, mp->m_sb.sb_sectsize) + in xfs_calc_write_reservation()
317 t2 = xfs_calc_buf_res(9, mp->m_sb.sb_sectsize) + in xfs_calc_itruncate_reservation()
321 t3 = xfs_calc_buf_res(5, mp->m_sb.sb_sectsize) + in xfs_calc_itruncate_reservation()
351 (xfs_calc_buf_res(7, mp->m_sb.sb_sectsize) + in xfs_calc_rename_reservation()
366 return xfs_calc_buf_res(1, mp->m_sb.sb_sectsize) + in xfs_calc_iunlink_remove_reservation()
391 (xfs_calc_buf_res(3, mp->m_sb.sb_sectsize) + in xfs_calc_link_reservation()
[all …]
Dxfs_types.c22 ASSERT(agno < mp->m_sb.sb_agcount); in xfs_ag_block_count()
24 if (agno < mp->m_sb.sb_agcount - 1) in xfs_ag_block_count()
25 return mp->m_sb.sb_agblocks; in xfs_ag_block_count()
26 return mp->m_sb.sb_dblocks - (agno * mp->m_sb.sb_agblocks); in xfs_ag_block_count()
60 if (agno >= mp->m_sb.sb_agcount) in xfs_verify_fsbno()
158 if (agno >= mp->m_sb.sb_agcount) in xfs_verify_ino()
171 return ino == mp->m_sb.sb_rbmino || ino == mp->m_sb.sb_rsumino || in xfs_internal_inum()
173 xfs_is_quota_inode(&mp->m_sb, ino)); in xfs_internal_inum()
199 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()
190 for (agno = 0; agno < mp->m_sb.sb_agcount; agno++) { in xfs_free_perag()
325 return mp->m_sb.sb_logstart > 0 && in is_log_ag()
326 id->agno == XFS_FSB_TO_AGNO(mp, mp->m_sb.sb_logstart); in is_log_ag()
357 mp->m_sb.sb_logstart); in xfs_freesp_init_recs()
381 be32_add_cpu(&arec->ar_startblock, mp->m_sb.sb_logblocks); in xfs_freesp_init_recs()
485 XFS_FSB_TO_AGBNO(mp, mp->m_sb.sb_logstart)); in xfs_rmaproot_init()
486 rrec->rm_blockcount = cpu_to_be32(mp->m_sb.sb_logblocks); in xfs_rmaproot_init()
509 xfs_sb_to_disk(dsb, &mp->m_sb); in xfs_sbblock_init()
544 uuid_copy(&agf->agf_uuid, &mp->m_sb.sb_meta_uuid); in xfs_agfblock_init()
[all …]
Dxfs_inode_buf.c52 ni = XFS_BB_TO_FSB(mp, bp->b_length) * mp->m_sb.sb_inopblock; in xfs_inode_buf_verify()
58 dip = xfs_buf_offset(bp, (i << mp->m_sb.sb_inodelog)); in xfs_inode_buf_verify()
325 uuid_copy(&to->di_uuid, &ip->i_mount->m_sb.sb_meta_uuid); in xfs_inode_to_disk()
418 if (!xfs_verify_cksum((char *)dip, mp->m_sb.sb_inodesize, in xfs_dinode_verify()
423 if (!uuid_equal(&dip->di_uuid, &mp->m_sb.sb_meta_uuid)) in xfs_dinode_verify()
446 if (mode && XFS_DFORK_BOFF(dip) > mp->m_sb.sb_inodesize) in xfs_dinode_verify()
554 crc = xfs_start_cksum_update((char *)dip, mp->m_sb.sb_inodesize, in xfs_dinode_calc_crc()
619 blocksize_bytes = XFS_FSB_TO_B(mp, mp->m_sb.sb_rextsize); in xfs_inode_validate_extsize()
621 blocksize_bytes = mp->m_sb.sb_blocksize; in xfs_inode_validate_extsize()
645 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.c99 ASSERT(mp->m_sb.sb_versionnum & XFS_SB_VERSION_DIRV2BIT); in xfs_da_mount()
100 ASSERT(xfs_dir2_dirblock_bytes(&mp->m_sb) <= XFS_MAX_BLOCKSIZE); in xfs_da_mount()
114 dageo->blklog = mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog; in xfs_da_mount()
115 dageo->fsblog = mp->m_sb.sb_blocklog; in xfs_da_mount()
116 dageo->blksize = xfs_dir2_dirblock_bytes(&mp->m_sb); in xfs_da_mount()
117 dageo->fsbcount = 1 << mp->m_sb.sb_dirblklog; in xfs_da_mount()
153 dageo->blklog = mp->m_sb.sb_blocklog; in xfs_da_mount()
154 dageo->fsblog = mp->m_sb.sb_blocklog; in xfs_da_mount()
Dxfs_format.h450 #define XFS_FSB_TO_B(mp,fsbno) ((xfs_fsize_t)(fsbno) << (mp)->m_sb.sb_blocklog)
452 ((((uint64_t)(b)) + (mp)->m_blockmask) >> (mp)->m_sb.sb_blocklog)
453 #define XFS_B_TO_FSBT(mp,b) (((uint64_t)(b)) >> (mp)->m_sb.sb_blocklog)
663 (((xfs_fsblock_t)(agno) << (mp)->m_sb.sb_agblklog) | (agbno))
665 ((xfs_agnumber_t)((fsbno) >> (mp)->m_sb.sb_agblklog))
667 ((xfs_agblock_t)((fsbno) & xfs_mask32lo((mp)->m_sb.sb_agblklog)))
670 (xfs_fsblock_t)(agno) * (mp)->m_sb.sb_agblocks + (agbno)))
888 ((mp)->m_sb.sb_inodesize - XFS_DINODE_SIZE(mp))
1015 #define XFS_INO_OFFSET_BITS(mp) (mp)->m_sb.sb_inopblog
1016 #define XFS_INO_AGBNO_BITS(mp) (mp)->m_sb.sb_agblklog
[all …]
Dxfs_refcount_btree.c323 ASSERT(pag->pag_agno < mp->m_sb.sb_agcount); in xfs_refcountbt_init_common()
329 cur->bc_blocklog = mp->m_sb.sb_blocklog; in xfs_refcountbt_init_common()
421 mp->m_refc_mnr, mp->m_sb.sb_agblocks); in xfs_refcountbt_compute_maxlevels()
482 if (mp->m_sb.sb_logstart && in xfs_refcountbt_calc_reserves()
483 XFS_FSB_TO_AGNO(mp, mp->m_sb.sb_logstart) == pag->pag_agno) in xfs_refcountbt_calc_reserves()
484 agblocks -= mp->m_sb.sb_logblocks; in xfs_refcountbt_calc_reserves()
Dxfs_log_rlimit.c95 if (xfs_has_logv2(mp) && mp->m_sb.sb_logsunit > 1) in xfs_log_calc_minimum_size()
96 lsunit = BTOBB(mp->m_sb.sb_logsunit); in xfs_log_calc_minimum_size()

1234