/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.h | 307 ((mp)->m_sb.sb_inodesize + \ 309 (2 * (mp)->m_sb.sb_sectsize) + \ 310 (mp)->m_sb.sb_sectsize + \ 313 ((2 * (mp)->m_sb.sb_sectsize) + \ 314 (2 * (mp)->m_sb.sb_sectsize) + \ 315 (mp)->m_sb.sb_sectsize + \ 336 ((mp)->m_sb.sb_inodesize + \ 339 ((4 * (mp)->m_sb.sb_sectsize) + \ 340 (4 * (mp)->m_sb.sb_sectsize) + \ 341 (mp)->m_sb.sb_sectsize + \ [all …]
|
D | xfs_mount.c | 303 xfs_sb_t *sbp = &mp->m_sb; in xfs_initialize_perag() 504 xfs_sb_from_disk(&mp->m_sb, XFS_BUF_TO_SBP(bp)); in xfs_readsb() 506 error = xfs_mount_validate_sb(mp, &(mp->m_sb), flags); in xfs_readsb() 515 if (sector_size > mp->m_sb.sb_sectsize) { in xfs_readsb() 518 sector_size, mp->m_sb.sb_sectsize); in xfs_readsb() 527 if (sector_size < mp->m_sb.sb_sectsize) { in xfs_readsb() 530 sector_size = mp->m_sb.sb_sectsize; in xfs_readsb() 571 mp->m_maxagi = mp->m_sb.sb_agcount; in xfs_mount_common() 637 xfs_sb_t *sbp = &mp->m_sb; in xfs_initialize_perag_data() 686 xfs_sb_t *sbp = &(mp->m_sb); in xfs_update_alignment() [all …]
|
D | xfs_dir2_leaf.h | 136 ((mp)->m_sb.sb_blocklog + (mp)->m_sb.sb_dirblklog)); in xfs_dir2_byte_to_db() 155 ((1 << ((mp)->m_sb.sb_blocklog + (mp)->m_sb.sb_dirblklog)) - 1)); in xfs_dir2_byte_to_off() 175 ((mp)->m_sb.sb_blocklog + (mp)->m_sb.sb_dirblklog)) + (o); in xfs_dir2_db_off_to_byte() 184 return (xfs_dablk_t)((db) << (mp)->m_sb.sb_dirblklog); in xfs_dir2_db_to_da() 212 return (xfs_dir2_db_t)((da) >> (mp)->m_sb.sb_dirblklog); in xfs_dir2_da_to_db()
|
D | xfs_itable.c | 47 return (ino == mp->m_sb.sb_rbmino || ino == mp->m_sb.sb_rsumino || in xfs_internal_inum() 48 (xfs_sb_version_hasquota(&mp->m_sb) && in xfs_internal_inum() 49 (ino == mp->m_sb.sb_uquotino || ino == mp->m_sb.sb_gquotino))); in xfs_internal_inum() 92 buf->bs_extsize = dic->di_extsize << mp->m_sb.sb_blocklog; in xfs_bulkstat_one_iget() 109 buf->bs_blksize = mp->m_sb.sb_blocksize; in xfs_bulkstat_one_iget() 115 buf->bs_blksize = mp->m_sb.sb_blocksize; in xfs_bulkstat_one_iget() 162 buf->bs_extsize = be32_to_cpu(dic->di_extsize) << mp->m_sb.sb_blocklog; in xfs_bulkstat_one_dinode() 179 buf->bs_blksize = mp->m_sb.sb_blocksize; in xfs_bulkstat_one_dinode() 185 buf->bs_blksize = mp->m_sb.sb_blocksize; in xfs_bulkstat_one_dinode() 295 xfs_buf_offset(bp, clustidx << mp->m_sb.sb_inodelog); in xfs_bulkstat_use_dinode() [all …]
|
D | xfs_ialloc.c | 52 if (xfs_sb_version_hasalign(&args->mp->m_sb) && in xfs_ialloc_cluster_alignment() 53 args->mp->m_sb.sb_inoalignmt >= in xfs_ialloc_cluster_alignment() 55 return args->mp->m_sb.sb_inoalignmt; in xfs_ialloc_cluster_alignment() 195 args.mp->m_sb.sb_icount + newlen > args.mp->m_maxicount) in xfs_ialloc_ag_alloc() 306 if (args.mp->m_sb.sb_blocksize >= XFS_INODE_CLUSTER_SIZE(args.mp)) { in xfs_ialloc_ag_alloc() 309 ninodes = args.mp->m_sb.sb_inopblock; in xfs_ialloc_ag_alloc() 312 args.mp->m_sb.sb_blocksize; in xfs_ialloc_ag_alloc() 314 ninodes = blks_per_cluster * args.mp->m_sb.sb_inopblock; in xfs_ialloc_ag_alloc() 323 if (xfs_sb_version_hasnlink(&args.mp->m_sb)) in xfs_ialloc_ag_alloc() 355 xfs_biozero(fbuf, 0, ninodes << args.mp->m_sb.sb_inodelog); in xfs_ialloc_ag_alloc() [all …]
|
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) 147 # define xfs_rtmount_init(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS)) 148 # define xfs_rtmount_inodes(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS))
|
D | xfs_rtalloc.c | 178 memset(XFS_BUF_PTR(bp), 0, mp->m_sb.sb_blocksize); in xfs_growfs_rt_alloc() 179 xfs_trans_log_buf(tp, bp, 0, mp->m_sb.sb_blocksize - 1); in xfs_growfs_rt_alloc() 422 if (bno >= mp->m_sb.sb_rextents) in xfs_rtallocate_extent_near() 423 bno = mp->m_sb.sb_rextents - 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() 567 else if (i <= 0 && (int)bbno - i < mp->m_sb.sb_rbmblocks - 1) in xfs_rtallocate_extent_near() 623 for (i = 0; i < mp->m_sb.sb_rbmblocks; i++) { in xfs_rtallocate_extent_size() 682 for (i = 0; i < mp->m_sb.sb_rbmblocks; i++) { in xfs_rtallocate_extent_size() 762 error = xfs_rtfind_forw(mp, tp, end, mp->m_sb.sb_rextents - 1, in xfs_rtallocate_range() 1111 for (bbno = omp->m_sb.sb_rbmblocks - 1; in xfs_rtcopy_summary() [all …]
|
D | xfs_qmops.c | 57 if (mp->m_sb.sb_qflags == 0) in xfs_mount_reset_sbqflags() 60 mp->m_sb.sb_qflags = 0; in xfs_mount_reset_sbqflags() 73 if ((error = xfs_trans_reserve(tp, 0, mp->m_sb.sb_sectsize + 128, 0, 0, in xfs_mount_reset_sbqflags() 103 if (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_ACCT) { in xfs_noquota_init()
|
D | xfs_ag.h | 156 #define XFS_AGFL_SIZE(mp) ((mp)->m_sb.sb_sectsize / sizeof(xfs_agblock_t)) 230 (((xfs_fsblock_t)(agno) << (mp)->m_sb.sb_agblklog) | (agbno)) 232 ((xfs_agnumber_t)((fsbno) >> (mp)->m_sb.sb_agblklog)) 234 ((xfs_agblock_t)((fsbno) & xfs_mask32lo((mp)->m_sb.sb_agblklog))) 237 (xfs_fsblock_t)(agno) * (mp)->m_sb.sb_agblocks + (agbno)))
|
D | xfs_dir2.c | 101 ASSERT(xfs_sb_version_hasdirv2(&mp->m_sb)); in xfs_dir_mount() 102 ASSERT((1 << (mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog)) <= in xfs_dir_mount() 104 mp->m_dirblksize = 1 << (mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog); in xfs_dir_mount() 105 mp->m_dirblkfsbs = 1 << mp->m_sb.sb_dirblklog; in xfs_dir_mount() 110 (mp->m_sb.sb_blocksize - (uint)sizeof(xfs_da_node_hdr_t)) / in xfs_dir_mount() 116 if (xfs_sb_version_hasasciici(&mp->m_sb)) in xfs_dir_mount() 159 agno < mp->m_sb.sb_agcount && in xfs_dir_ino_validate() 160 agblkno < mp->m_sb.sb_agblocks && in xfs_dir_ino_validate() 162 ioff < (1 << mp->m_sb.sb_inopblog) && in xfs_dir_ino_validate() 685 *vp = last == mp->m_dirleafblk + (1 << mp->m_sb.sb_dirblklog); in xfs_dir2_isleaf()
|
D | xfs_log_priv.h | 45 #define XLOG_BTOLSUNIT(log, b) (((b)+(log)->l_mp->m_sb.sb_logsunit-1) / \ 46 (log)->l_mp->m_sb.sb_logsunit) 47 #define XLOG_LSUNITTOB(log, su) ((su) * (log)->l_mp->m_sb.sb_logsunit) 52 BTOBB(1 << (xfs_sb_version_haslogv2(&log->l_mp->m_sb) ? \ 55 BTOBB(XLOG_MAX_ICLOGS << (xfs_sb_version_haslogv2(&log->l_mp->m_sb) ? \
|
D | xfs_utils.c | 283 if (!xfs_sb_version_hasnlink(&mp->m_sb)) { in xfs_bump_ino_vers2() 285 if (!xfs_sb_version_hasnlink(&mp->m_sb)) { in xfs_bump_ino_vers2() 286 xfs_sb_version_addnlink(&mp->m_sb); in xfs_bump_ino_vers2() 346 if (ip->i_ino != mp->m_sb.sb_uquotino) in xfs_truncate_file() 350 if (ip->i_ino != mp->m_sb.sb_gquotino) in xfs_truncate_file()
|
D | xfs_quota.h | 263 (mp->m_sb.sb_qflags & XFS_UQUOTA_CHKD) == 0) || \ 265 ((mp->m_sb.sb_qflags & XFS_OQUOTA_CHKD) == 0 || \ 266 (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT))) || \ 268 ((mp->m_sb.sb_qflags & XFS_OQUOTA_CHKD) == 0 || \ 269 (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT))))
|
D | xfs_inum.h | 48 #define XFS_INO_OFFSET_BITS(mp) (mp)->m_sb.sb_inopblog 49 #define XFS_INO_AGBNO_BITS(mp) (mp)->m_sb.sb_agblklog
|
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)) 232 xfs_sb_t m_sb; /* copy of fs superblock */ member 413 (mp->m_swidth << mp->m_sb.sb_blocklog) : in xfs_preferred_iosize() 448 do_div(ld, mp->m_sb.sb_agblocks); in xfs_daddr_to_agno() 456 return (xfs_agblock_t) do_div(ld, mp->m_sb.sb_agblocks); in xfs_daddr_to_agbno()
|
D | xfs_bmap.c | 2406 if (rt && (temp = (align_alen % mp->m_sb.sb_rextsize))) { in xfs_bmap_extsize_align() 2433 align_alen -= align_alen % mp->m_sb.sb_rextsize; in xfs_bmap_extsize_align() 2471 (x) < mp->m_sb.sb_rblocks : \ in xfs_bmap_adjacent() 2473 XFS_FSB_TO_AGNO(mp, x) < mp->m_sb.sb_agcount && \ in xfs_bmap_adjacent() 2474 XFS_FSB_TO_AGBNO(mp, x) < mp->m_sb.sb_agblocks) in xfs_bmap_adjacent() 2621 prod = align / mp->m_sb.sb_rextsize; in xfs_bmap_rtalloc() 2628 ASSERT(ap->alen % mp->m_sb.sb_rextsize == 0); in xfs_bmap_rtalloc() 2639 ralen = ap->alen / mp->m_sb.sb_rextsize; in xfs_bmap_rtalloc() 2647 if (ralen * mp->m_sb.sb_rextsize >= MAXEXTLEN) in xfs_bmap_rtalloc() 2648 ralen = MAXEXTLEN / mp->m_sb.sb_rextsize; in xfs_bmap_rtalloc() [all …]
|
D | xfs_log.c | 1141 if (xfs_sb_version_haslogv2(&mp->m_sb)) { in xlog_get_iclog_buffer_size() 1171 if (mp->m_sb.sb_blocksize >= 16*1024) { in xlog_get_iclog_buffer_size() 1175 switch (mp->m_sb.sb_blocksize) { in xlog_get_iclog_buffer_size() 1239 if (xfs_sb_version_hassector(&mp->m_sb)) { in xlog_alloc_log() 1240 log->l_sectbb_log = mp->m_sb.sb_logsectlog - BBSHIFT; in xlog_alloc_log() 1245 xfs_sb_version_haslogv2(&mp->m_sb)); in xlog_alloc_log() 1246 ASSERT(mp->m_sb.sb_logsectlog >= BBSHIFT); in xlog_alloc_log() 1306 xfs_sb_version_haslogv2(&log->l_mp->m_sb) ? 2 : 1); in xlog_alloc_log() 1310 memcpy(&head->h_fs_uuid, &mp->m_sb.sb_uuid, sizeof(uuid_t)); in xlog_alloc_log() 1483 int v2 = xfs_sb_version_haslogv2(&log->l_mp->m_sb); in xlog_sync() [all …]
|
D | xfs_log_recover.c | 214 cmn_err(CE_DEBUG, "%02x", ((uchar_t *)&mp->m_sb.sb_uuid)[b]); in xlog_header_check_dump() 247 } else if (unlikely(!uuid_equal(&mp->m_sb.sb_uuid, &head->h_fs_uuid))) { in xlog_header_check_recover() 275 } else if (unlikely(!uuid_equal(&mp->m_sb.sb_uuid, &head->h_fs_uuid))) { in xlog_header_check_mount() 494 if (xfs_sb_version_haslogv2(&log->l_mp->m_sb)) { in xlog_find_verify_log_record() 904 if (xfs_sb_version_haslogv2(&log->l_mp->m_sb)) { in xlog_find_tail() 1117 xfs_sb_version_haslogv2(&log->l_mp->m_sb) ? 2 : 1); in xlog_add_record() 1121 memcpy(&recp->h_fs_uuid, &log->l_mp->m_sb.sb_uuid, sizeof(uuid_t)); in xlog_add_record() 1829 inodes_per_buf = XFS_BUF_COUNT(bp) >> mp->m_sb.sb_inodelog; in xlog_recover_do_inode_buffer() 1831 next_unlinked_offset = (i * mp->m_sb.sb_inodesize) + in xlog_recover_do_inode_buffer() 2246 (XFS_BUF_COUNT(bp) != MAX(log->l_mp->m_sb.sb_blocksize, in xlog_recover_do_buffer_trans() [all …]
|
D | xfs_filestream.c | 148 minfree = mp->m_sb.sb_agblocks / 50; in _xfs_filestream_pick_ag() 210 if (++ag >= mp->m_sb.sb_agcount) in _xfs_filestream_pick_ag() 581 startag = (mp->m_agfrotor / rotorstep) % mp->m_sb.sb_agcount; in xfs_filestream_associate() 583 (mp->m_sb.sb_agcount * rotorstep); in xfs_filestream_associate() 711 ag = (ag == NULLAGNUMBER) ? 0 : (ag + 1) % mp->m_sb.sb_agcount; in xfs_filestream_new_ag()
|
/fs/xfs/quota/ |
D | xfs_qm_syscalls.c | 240 mp->m_sb.sb_qflags = mp->m_qflags; in xfs_qm_scall_quotaoff() 388 if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0) { in xfs_qm_scall_trunc_qfiles() 393 if ((flags & XFS_DQ_USER) && mp->m_sb.sb_uquotino != NULLFSINO) { in xfs_qm_scall_trunc_qfiles() 394 error = xfs_iget(mp, NULL, mp->m_sb.sb_uquotino, 0, 0, &qip, 0); in xfs_qm_scall_trunc_qfiles() 402 mp->m_sb.sb_gquotino != NULLFSINO) { in xfs_qm_scall_trunc_qfiles() 403 error2 = xfs_iget(mp, NULL, mp->m_sb.sb_gquotino, 0, 0, &qip, 0); in xfs_qm_scall_trunc_qfiles() 455 (mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon() 459 (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon() 461 (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) == 0 && in xfs_qm_scall_quotaon() 464 flags, mp->m_sb.sb_qflags); in xfs_qm_scall_quotaon() [all …]
|
D | xfs_qm_bhv.c | 120 quotaondisk = xfs_sb_version_hasquota(&mp->m_sb) && in xfs_qm_newmount() 121 (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_ACCT); in xfs_qm_newmount() 124 uquotaondisk = mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT; in xfs_qm_newmount() 125 pquotaondisk = mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT; in xfs_qm_newmount() 126 gquotaondisk = mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT; in xfs_qm_newmount()
|
D | xfs_qm.c | 321 if (mp->m_sb.sb_rextents) { in xfs_qm_mount_quotas() 370 sbf = mp->m_sb.sb_qflags; in xfs_qm_mount_quotas() 371 mp->m_sb.sb_qflags = mp->m_qflags & XFS_MOUNT_QUOTA_ALL; in xfs_qm_mount_quotas() 841 (ip->i_ino == mp->m_sb.sb_uquotino) || in xfs_qm_dqattach() 842 (ip->i_ino == mp->m_sb.sb_gquotino)) in xfs_qm_dqattach() 946 ASSERT(ip->i_ino != ip->i_mount->m_sb.sb_uquotino); in xfs_qm_dqdetach() 947 ASSERT(ip->i_ino != ip->i_mount->m_sb.sb_gquotino); in xfs_qm_dqdetach() 1128 mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_CHKD); in xfs_qm_init_quotainfo() 1379 unsigned oldv = mp->m_sb.sb_versionnum; in xfs_qm_qino_alloc() 1381 ASSERT(!xfs_sb_version_hasquota(&mp->m_sb)); in xfs_qm_qino_alloc() [all …]
|
/fs/xfs/linux-2.6/ |
D | xfs_super.c | 836 error = xfs_setsize_buftarg(mp->m_ddev_targp, mp->m_sb.sb_blocksize, in xfs_setup_devices() 837 mp->m_sb.sb_sectsize); in xfs_setup_devices() 844 if (xfs_sb_version_hassector(&mp->m_sb)) in xfs_setup_devices() 845 log_sector_size = mp->m_sb.sb_logsectsize; in xfs_setup_devices() 847 mp->m_sb.sb_blocksize, in xfs_setup_devices() 854 mp->m_sb.sb_blocksize, in xfs_setup_devices() 855 mp->m_sb.sb_sectsize); in xfs_setup_devices() 1152 xfs_sb_t *sbp = &mp->m_sb; in xfs_fs_statfs() 1367 if (xfs_sb_version_haslogv2(&mp->m_sb)) { in xfs_finish_flags() 1369 mp->m_sb.sb_logsunit > XLOG_BIG_RECORD_BSIZE) { in xfs_finish_flags() [all …]
|
D | xfs_ioctl.c | 641 if (!xfs_sb_version_hasextflgbit(&ip->i_mount->m_sb) && in xfs_ioc_space() 821 fa.fsx_extsize = ip->i_d.di_extsize << ip->i_mount->m_sb.sb_blocklog; in xfs_ioc_fsgetxattr() 999 ((ip->i_d.di_extsize << mp->m_sb.sb_blocklog) != in xfs_ioctl_setattr() 1015 size = mp->m_sb.sb_rextsize << in xfs_ioctl_setattr() 1016 mp->m_sb.sb_blocklog; in xfs_ioctl_setattr() 1018 size = mp->m_sb.sb_blocksize; in xfs_ioctl_setattr() 1044 if ((mp->m_sb.sb_rblocks == 0) || in xfs_ioctl_setattr() 1045 (mp->m_sb.sb_rextsize == 0) || in xfs_ioctl_setattr() 1046 (ip->i_d.di_extsize % mp->m_sb.sb_rextsize)) { in xfs_ioctl_setattr() 1106 ip->i_d.di_extsize = fa->fsx_extsize >> mp->m_sb.sb_blocklog; in xfs_ioctl_setattr()
|