/fs/xfs/ |
D | xfs_fsops.c | 59 geo->blocksize = mp->m_sb.sb_blocksize; in xfs_fs_geometry() 60 geo->rtextsize = mp->m_sb.sb_rextsize; in xfs_fs_geometry() 61 geo->agblocks = mp->m_sb.sb_agblocks; in xfs_fs_geometry() 62 geo->agcount = mp->m_sb.sb_agcount; in xfs_fs_geometry() 63 geo->logblocks = mp->m_sb.sb_logblocks; in xfs_fs_geometry() 64 geo->sectsize = mp->m_sb.sb_sectsize; in xfs_fs_geometry() 65 geo->inodesize = mp->m_sb.sb_inodesize; in xfs_fs_geometry() 66 geo->imaxpct = mp->m_sb.sb_imax_pct; in xfs_fs_geometry() 67 geo->datablocks = mp->m_sb.sb_dblocks; in xfs_fs_geometry() 68 geo->rtblocks = mp->m_sb.sb_rblocks; in xfs_fs_geometry() [all …]
|
D | xfs_trans.c | 89 MAX((mp->m_sb.sb_inodesize + in xfs_calc_write_reservation() 91 2 * mp->m_sb.sb_sectsize + in xfs_calc_write_reservation() 92 mp->m_sb.sb_sectsize + in xfs_calc_write_reservation() 96 (2 * mp->m_sb.sb_sectsize + in xfs_calc_write_reservation() 97 2 * mp->m_sb.sb_sectsize + in xfs_calc_write_reservation() 98 mp->m_sb.sb_sectsize + in xfs_calc_write_reservation() 121 MAX((mp->m_sb.sb_inodesize + in xfs_calc_itruncate_reservation() 124 (4 * mp->m_sb.sb_sectsize + in xfs_calc_itruncate_reservation() 125 4 * mp->m_sb.sb_sectsize + in xfs_calc_itruncate_reservation() 126 mp->m_sb.sb_sectsize + in xfs_calc_itruncate_reservation() [all …]
|
D | xfs_mount.c | 126 uuid_t *uuid = &mp->m_sb.sb_uuid; in xfs_uuid_mount() 169 uuid_t *uuid = &mp->m_sb.sb_uuid; in xfs_uuid_unmount() 267 for (agno = 0; agno < mp->m_sb.sb_agcount; agno++) { in xfs_free_perag() 448 xfs_sb_t *sbp = &mp->m_sb; in xfs_initialize_perag() 559 struct xfs_sb *to = &mp->m_sb; in xfs_sb_from_disk() 699 error = xfs_mount_validate_sb(mp, &(mp->m_sb), flags); in xfs_readsb() 709 if (sector_size > mp->m_sb.sb_sectsize) { in xfs_readsb() 712 sector_size, mp->m_sb.sb_sectsize); in xfs_readsb() 721 if (sector_size < mp->m_sb.sb_sectsize) { in xfs_readsb() 723 sector_size = mp->m_sb.sb_sectsize; in xfs_readsb() [all …]
|
D | xfs_qm_syscalls.c | 97 mp->m_sb.sb_qflags = mp->m_qflags; in xfs_qm_scall_quotaoff() 287 if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0) { in xfs_qm_scall_trunc_qfiles() 294 error = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_uquotino); in xfs_qm_scall_trunc_qfiles() 296 error2 = xfs_qm_scall_trunc_qfile(mp, mp->m_sb.sb_gquotino); in xfs_qm_scall_trunc_qfiles() 338 (mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon() 342 (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon() 344 (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon() 348 __func__, flags, mp->m_sb.sb_qflags); in xfs_qm_scall_quotaon() 362 qf = mp->m_sb.sb_qflags; in xfs_qm_scall_quotaon() 363 mp->m_sb.sb_qflags = qf | flags; in xfs_qm_scall_quotaon() [all …]
|
D | xfs_itable.c | 44 return (ino == mp->m_sb.sb_rbmino || ino == mp->m_sb.sb_rsumino || in xfs_internal_inum() 45 (xfs_sb_version_hasquota(&mp->m_sb) && in xfs_internal_inum() 46 (ino == mp->m_sb.sb_uquotino || ino == mp->m_sb.sb_gquotino))); in xfs_internal_inum() 108 buf->bs_extsize = dic->di_extsize << mp->m_sb.sb_blocklog; in xfs_bulkstat_one_int() 126 buf->bs_blksize = mp->m_sb.sb_blocksize; in xfs_bulkstat_one_int() 132 buf->bs_blksize = mp->m_sb.sb_blocksize; in xfs_bulkstat_one_int() 233 if (agno >= mp->m_sb.sb_agcount || in xfs_bulkstat() 248 nicluster = mp->m_sb.sb_blocksize >= XFS_INODE_CLUSTER_SIZE(mp) ? in xfs_bulkstat() 249 mp->m_sb.sb_inopblock : in xfs_bulkstat() 250 (XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog); in xfs_bulkstat() [all …]
|
D | xfs_ialloc.c | 48 if (xfs_sb_version_hasalign(&args->mp->m_sb) && in xfs_ialloc_cluster_alignment() 49 args->mp->m_sb.sb_inoalignmt >= in xfs_ialloc_cluster_alignment() 51 return args->mp->m_sb.sb_inoalignmt; in xfs_ialloc_cluster_alignment() 174 if (mp->m_sb.sb_blocksize >= XFS_INODE_CLUSTER_SIZE(mp)) { in xfs_ialloc_inode_init() 177 ninodes = mp->m_sb.sb_inopblock; in xfs_ialloc_inode_init() 180 mp->m_sb.sb_blocksize; in xfs_ialloc_inode_init() 182 ninodes = blks_per_cluster * mp->m_sb.sb_inopblock; in xfs_ialloc_inode_init() 192 if (xfs_sb_version_hasnlink(&mp->m_sb)) in xfs_ialloc_inode_init() 214 xfs_buf_zero(fbuf, 0, ninodes << mp->m_sb.sb_inodelog); in xfs_ialloc_inode_init() 216 int ioffset = i << mp->m_sb.sb_inodelog; in xfs_ialloc_inode_init() [all …]
|
D | xfs_qm_bhv.c | 99 quotaondisk = xfs_sb_version_hasquota(&mp->m_sb) && in xfs_qm_newmount() 100 (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_ACCT); in xfs_qm_newmount() 103 uquotaondisk = mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT; in xfs_qm_newmount() 104 pquotaondisk = mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT; in xfs_qm_newmount() 105 gquotaondisk = mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT; in xfs_qm_newmount()
|
D | xfs_dir2_format.h | 410 (by >> (mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog)); in xfs_dir2_byte_to_db() 429 ((1 << (mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog)) - 1)); in xfs_dir2_byte_to_off() 449 (mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog)) + o; in xfs_dir2_db_off_to_byte() 458 return (xfs_dablk_t)(db << mp->m_sb.sb_dirblklog); in xfs_dir2_db_to_da() 486 return (xfs_dir2_db_t)(da >> mp->m_sb.sb_dirblklog); in xfs_dir2_da_to_db()
|
D | xfs_rtalloc.h | 38 #define XFS_BLOCKSIZE(mp) ((mp)->m_sb.sb_blocksize) 46 #define XFS_SUMOFFS(mp,ls,bb) ((int)((ls) * (mp)->m_sb.sb_rbmblocks + (bb))) 48 (((s) * (uint)sizeof(xfs_suminfo_t)) >> (mp)->m_sb.sb_blocklog) 154 if (mp->m_sb.sb_rblocks == 0) in xfs_rtmount_init() 160 # define xfs_rtmount_inodes(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS))
|
D | xfs_qm.c | 270 if (mp->m_sb.sb_rextents) { in xfs_qm_mount_quotas() 317 sbf = mp->m_sb.sb_qflags; in xfs_qm_mount_quotas() 318 mp->m_sb.sb_qflags = mp->m_qflags & XFS_MOUNT_QUOTA_ALL; in xfs_qm_mount_quotas() 506 ip->i_ino == mp->m_sb.sb_uquotino || in xfs_qm_dqattach_locked() 507 ip->i_ino == mp->m_sb.sb_gquotino) in xfs_qm_dqattach_locked() 599 ASSERT(ip->i_ino != ip->i_mount->m_sb.sb_uquotino); in xfs_qm_dqdetach() 600 ASSERT(ip->i_ino != ip->i_mount->m_sb.sb_gquotino); in xfs_qm_dqdetach() 654 mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_CHKD); in xfs_qm_init_quotainfo() 785 ASSERT(!xfs_sb_version_hasquota(&mp->m_sb)); in xfs_qm_qino_alloc() 791 xfs_sb_version_addquota(&mp->m_sb); in xfs_qm_qino_alloc() [all …]
|
D | xfs_dir2.c | 94 ASSERT(xfs_sb_version_hasdirv2(&mp->m_sb)); in xfs_dir_mount() 95 ASSERT((1 << (mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog)) <= in xfs_dir_mount() 97 mp->m_dirblksize = 1 << (mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog); in xfs_dir_mount() 98 mp->m_dirblkfsbs = 1 << mp->m_sb.sb_dirblklog; in xfs_dir_mount() 103 (mp->m_sb.sb_blocksize - (uint)sizeof(xfs_da_node_hdr_t)) / in xfs_dir_mount() 109 if (xfs_sb_version_hasasciici(&mp->m_sb)) in xfs_dir_mount() 152 agno < mp->m_sb.sb_agcount && in xfs_dir_ino_validate() 153 agblkno < mp->m_sb.sb_agblocks && in xfs_dir_ino_validate() 155 ioff < (1 << mp->m_sb.sb_inopblog) && in xfs_dir_ino_validate() 583 *vp = last == mp->m_dirleafblk + (1 << mp->m_sb.sb_dirblklog); in xfs_dir2_isleaf()
|
D | xfs_rtalloc.c | 171 memset(bp->b_addr, 0, mp->m_sb.sb_blocksize); in xfs_growfs_rt_alloc() 172 xfs_trans_log_buf(tp, bp, 0, mp->m_sb.sb_blocksize - 1); in xfs_growfs_rt_alloc() 416 if (bno >= mp->m_sb.sb_rextents) in xfs_rtallocate_extent_near() 417 bno = mp->m_sb.sb_rextents - 1; in xfs_rtallocate_extent_near() 555 else if (i > 0 && (int)bbno + i < mp->m_sb.sb_rbmblocks - 1) in xfs_rtallocate_extent_near() 561 else if (i <= 0 && (int)bbno - i < mp->m_sb.sb_rbmblocks - 1) in xfs_rtallocate_extent_near() 617 for (i = 0; i < mp->m_sb.sb_rbmblocks; i++) { in xfs_rtallocate_extent_size() 676 for (i = 0; i < mp->m_sb.sb_rbmblocks; i++) { in xfs_rtallocate_extent_size() 756 error = xfs_rtfind_forw(mp, tp, end, mp->m_sb.sb_rextents - 1, in xfs_rtallocate_range() 1095 for (bbno = omp->m_sb.sb_rbmblocks - 1; in xfs_rtcopy_summary() [all …]
|
D | xfs_mount.h | 48 ((xfs_agnumber_t)(XFS_BB_TO_FSBT(mp, d) / (mp)->m_sb.sb_agblocks)) 50 ((xfs_agblock_t)(XFS_BB_TO_FSBT(mp, d) % (mp)->m_sb.sb_agblocks)) 120 xfs_sb_t m_sb; /* copy of fs superblock */ member 293 (mp->m_swidth << mp->m_sb.sb_blocklog) : in xfs_preferred_iosize() 328 do_div(ld, mp->m_sb.sb_agblocks); in xfs_daddr_to_agno() 336 return (xfs_agblock_t) do_div(ld, mp->m_sb.sb_agblocks); in xfs_daddr_to_agbno()
|
D | xfs_ag.h | 170 #define XFS_AGFL_SIZE(mp) ((mp)->m_sb.sb_sectsize / sizeof(xfs_agblock_t)) 268 (((xfs_fsblock_t)(agno) << (mp)->m_sb.sb_agblklog) | (agbno)) 270 ((xfs_agnumber_t)((fsbno) >> (mp)->m_sb.sb_agblklog)) 272 ((xfs_agblock_t)((fsbno) & xfs_mask32lo((mp)->m_sb.sb_agblklog))) 275 (xfs_fsblock_t)(agno) * (mp)->m_sb.sb_agblocks + (agbno)))
|
D | xfs_super.c | 735 error = xfs_setsize_buftarg(mp->m_ddev_targp, mp->m_sb.sb_blocksize, in xfs_setup_devices() 736 mp->m_sb.sb_sectsize); in xfs_setup_devices() 743 if (xfs_sb_version_hassector(&mp->m_sb)) in xfs_setup_devices() 744 log_sector_size = mp->m_sb.sb_logsectsize; in xfs_setup_devices() 746 mp->m_sb.sb_blocksize, in xfs_setup_devices() 753 mp->m_sb.sb_blocksize, in xfs_setup_devices() 754 mp->m_sb.sb_sectsize); in xfs_setup_devices() 1040 xfs_sb_t *sbp = &mp->m_sb; in xfs_fs_statfs() 1246 if (xfs_sb_version_haslogv2(&mp->m_sb)) { in xfs_finish_flags() 1248 mp->m_sb.sb_logsunit > XLOG_BIG_RECORD_BSIZE) { in xfs_finish_flags() [all …]
|
D | xfs_quota.h | 260 (mp->m_sb.sb_qflags & XFS_UQUOTA_CHKD) == 0) || \ 262 ((mp->m_sb.sb_qflags & XFS_OQUOTA_CHKD) == 0 || \ 263 (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT))) || \ 265 ((mp->m_sb.sb_qflags & XFS_OQUOTA_CHKD) == 0 || \ 266 (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT))))
|
D | xfs_log_priv.h | 43 #define XLOG_BTOLSUNIT(log, b) (((b)+(log)->l_mp->m_sb.sb_logsunit-1) / \ 44 (log)->l_mp->m_sb.sb_logsunit) 45 #define XLOG_LSUNITTOB(log, su) ((su) * (log)->l_mp->m_sb.sb_logsunit) 50 BTOBB(1 << (xfs_sb_version_haslogv2(&log->l_mp->m_sb) ? \ 53 BTOBB(XLOG_MAX_ICLOGS << (xfs_sb_version_haslogv2(&log->l_mp->m_sb) ? \
|
D | xfs_utils.c | 278 if (!xfs_sb_version_hasnlink(&mp->m_sb)) { in xfs_bump_ino_vers2() 280 if (!xfs_sb_version_hasnlink(&mp->m_sb)) { in xfs_bump_ino_vers2() 281 xfs_sb_version_addnlink(&mp->m_sb); in xfs_bump_ino_vers2()
|
D | xfs_ioctl.c | 614 if (!xfs_sb_version_hasextflgbit(&ip->i_mount->m_sb) && in xfs_ioc_space() 804 fa.fsx_extsize = ip->i_d.di_extsize << ip->i_mount->m_sb.sb_blocklog; in xfs_ioc_fsgetxattr() 927 !xfs_sb_version_hasprojid32bit(&ip->i_mount->m_sb)) in xfs_ioctl_setattr() 991 ((ip->i_d.di_extsize << mp->m_sb.sb_blocklog) != in xfs_ioctl_setattr() 1019 size = mp->m_sb.sb_rextsize << in xfs_ioctl_setattr() 1020 mp->m_sb.sb_blocklog; in xfs_ioctl_setattr() 1022 size = mp->m_sb.sb_blocksize; in xfs_ioctl_setattr() 1023 if (extsize_fsb > mp->m_sb.sb_agblocks / 2) { in xfs_ioctl_setattr() 1052 if ((mp->m_sb.sb_rblocks == 0) || in xfs_ioctl_setattr() 1053 (mp->m_sb.sb_rextsize == 0) || in xfs_ioctl_setattr() [all …]
|
D | xfs_discard.c | 186 if (XFS_BB_TO_FSB(mp, start) >= mp->m_sb.sb_dblocks) in xfs_ioc_trim() 188 if (end > XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks) - 1) in xfs_ioc_trim() 189 end = XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks)- 1; in xfs_ioc_trim()
|
D | xfs_inum.h | 37 #define XFS_INO_OFFSET_BITS(mp) (mp)->m_sb.sb_inopblog 38 #define XFS_INO_AGBNO_BITS(mp) (mp)->m_sb.sb_agblklog
|
D | xfs_bmap.c | 1967 if (rt && (temp = (align_alen % mp->m_sb.sb_rextsize))) { in xfs_bmap_extsize_align() 1994 align_alen -= align_alen % mp->m_sb.sb_rextsize; in xfs_bmap_extsize_align() 2032 (x) < mp->m_sb.sb_rblocks : \ in xfs_bmap_adjacent() 2034 XFS_FSB_TO_AGNO(mp, x) < mp->m_sb.sb_agcount && \ in xfs_bmap_adjacent() 2035 XFS_FSB_TO_AGBNO(mp, x) < mp->m_sb.sb_agblocks) in xfs_bmap_adjacent() 2182 prod = align / mp->m_sb.sb_rextsize; in xfs_bmap_rtalloc() 2189 ASSERT(ap->length % mp->m_sb.sb_rextsize == 0); in xfs_bmap_rtalloc() 2200 ralen = ap->length / mp->m_sb.sb_rextsize; in xfs_bmap_rtalloc() 2208 if (ralen * mp->m_sb.sb_rextsize >= MAXEXTLEN) in xfs_bmap_rtalloc() 2209 ralen = MAXEXTLEN / mp->m_sb.sb_rextsize; in xfs_bmap_rtalloc() [all …]
|
D | xfs_alloc.h | 77 #define XFS_ALLOC_SET_ASIDE(mp) (4 + ((mp)->m_sb.sb_agcount * 4)) 92 ((mp)->m_sb.sb_agblocks - XFS_BB_TO_FSB(mp, XFS_FSS_TO_BB(mp, 4)) - 7)
|
D | xfs_log_recover.c | 287 __func__, &mp->m_sb.sb_uuid, XLOG_FMT); in xlog_header_check_dump() 317 } else if (unlikely(!uuid_equal(&mp->m_sb.sb_uuid, &head->h_fs_uuid))) { in xlog_header_check_recover() 345 } else if (unlikely(!uuid_equal(&mp->m_sb.sb_uuid, &head->h_fs_uuid))) { in xlog_header_check_mount() 566 if (xfs_sb_version_haslogv2(&log->l_mp->m_sb)) { in xlog_find_verify_log_record() 984 if (xfs_sb_version_haslogv2(&log->l_mp->m_sb)) { in xlog_find_tail() 1196 xfs_sb_version_haslogv2(&log->l_mp->m_sb) ? 2 : 1); in xlog_add_record() 1200 memcpy(&recp->h_fs_uuid, &log->l_mp->m_sb.sb_uuid, sizeof(uuid_t)); in xlog_add_record() 1775 inodes_per_buf = XFS_BUF_COUNT(bp) >> mp->m_sb.sb_inodelog; in xlog_recover_do_inode_buffer() 1777 next_unlinked_offset = (i * mp->m_sb.sb_inodesize) + in xlog_recover_do_inode_buffer() 2169 (XFS_BUF_COUNT(bp) != MAX(log->l_mp->m_sb.sb_blocksize, in xlog_recover_buffer_pass2() [all …]
|
D | xfs_log.c | 1067 if (xfs_sb_version_haslogv2(&mp->m_sb)) { in xlog_get_iclog_buffer_size() 1146 if (xfs_sb_version_hassector(&mp->m_sb)) { in xlog_alloc_log() 1147 log2_size = mp->m_sb.sb_logsectlog; in xlog_alloc_log() 1163 !xfs_sb_version_haslogv2(&mp->m_sb)) { in xlog_alloc_log() 1221 xfs_sb_version_haslogv2(&log->l_mp->m_sb) ? 2 : 1); in xlog_alloc_log() 1225 memcpy(&head->h_fs_uuid, &mp->m_sb.sb_uuid, sizeof(uuid_t)); in xlog_alloc_log() 1426 int v2 = xfs_sb_version_haslogv2(&log->l_mp->m_sb); in xlog_sync() 1435 if (v2 && log->l_mp->m_sb.sb_logsunit > 1) { in xlog_sync() 1443 ASSERT((v2 && log->l_mp->m_sb.sb_logsunit > 1 && in xlog_sync() 1444 roundoff < log->l_mp->m_sb.sb_logsunit) in xlog_sync() [all …]
|