/fs/xfs/ |
D | xfs_sb.h | 341 #define XFS_SB_VERSION_NUM(sbp) ((sbp)->sb_versionnum & XFS_SB_VERSION_NUMBITS) argument 343 static inline int xfs_sb_good_version(xfs_sb_t *sbp) in xfs_sb_good_version() argument 346 if (sbp->sb_versionnum >= XFS_SB_VERSION_1 && in xfs_sb_good_version() 347 sbp->sb_versionnum <= XFS_SB_VERSION_3) in xfs_sb_good_version() 351 if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) { in xfs_sb_good_version() 352 if ((sbp->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) || in xfs_sb_good_version() 353 ((sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && in xfs_sb_good_version() 354 (sbp->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS))) in xfs_sb_good_version() 358 if (sbp->sb_shared_vn > XFS_SB_MAX_SHARED_VN) in xfs_sb_good_version() 361 if ((sbp->sb_versionnum & XFS_SB_VERSION_SHAREDBIT) && in xfs_sb_good_version() [all …]
|
D | xfs_mount.c | 294 xfs_sb_t *sbp, in xfs_sb_validate_fsb_count() argument 297 ASSERT(PAGE_SHIFT >= sbp->sb_blocklog); in xfs_sb_validate_fsb_count() 298 ASSERT(sbp->sb_blocklog >= BBSHIFT); in xfs_sb_validate_fsb_count() 301 if (nblocks >> (PAGE_CACHE_SHIFT - sbp->sb_blocklog) > ULONG_MAX) in xfs_sb_validate_fsb_count() 304 if (nblocks << (sbp->sb_blocklog - BBSHIFT) > UINT_MAX) in xfs_sb_validate_fsb_count() 316 xfs_sb_t *sbp, in xfs_mount_validate_sb() argument 328 if (sbp->sb_magicnum != XFS_SB_MAGIC) { in xfs_mount_validate_sb() 334 if (!xfs_sb_good_version(sbp)) { in xfs_mount_validate_sb() 344 if (check_version && XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) { in xfs_mount_validate_sb() 349 if (xfs_sb_has_compat_feature(sbp, in xfs_mount_validate_sb() [all …]
|
D | xfs_rtalloc.c | 1856 xfs_sb_t *sbp; /* old superblock */ in xfs_growfs_rt() local 1859 sbp = &mp->m_sb; in xfs_growfs_rt() 1866 (nrblocks = in->newblocks) <= sbp->sb_rblocks || in xfs_growfs_rt() 1867 (sbp->sb_rblocks && (in->extsize != sbp->sb_rextsize))) in xfs_growfs_rt() 1869 if ((error = xfs_sb_validate_fsb_count(sbp, nrblocks))) in xfs_growfs_rt() 1891 nrbmblocks = howmany_64(nrextents, NBBY * sbp->sb_blocksize); in xfs_growfs_rt() 1929 for (bmbno = sbp->sb_rbmblocks - in xfs_growfs_rt() 1930 ((sbp->sb_rextents & ((1 << mp->m_blkbit_log) - 1)) != 0); in xfs_growfs_rt() 1990 if (sbp->sb_rbmblocks != nsbp->sb_rbmblocks || in xfs_growfs_rt() 1999 if (nsbp->sb_rextsize != sbp->sb_rextsize) in xfs_growfs_rt() [all …]
|
D | xfs_trans.c | 1037 xfs_dsb_t *sbp; in xfs_trans_apply_sb_deltas() local 1042 sbp = XFS_BUF_TO_SBP(bp); in xfs_trans_apply_sb_deltas() 1056 be64_add_cpu(&sbp->sb_icount, tp->t_icount_delta); in xfs_trans_apply_sb_deltas() 1058 be64_add_cpu(&sbp->sb_ifree, tp->t_ifree_delta); in xfs_trans_apply_sb_deltas() 1060 be64_add_cpu(&sbp->sb_fdblocks, tp->t_fdblocks_delta); in xfs_trans_apply_sb_deltas() 1062 be64_add_cpu(&sbp->sb_fdblocks, tp->t_res_fdblocks_delta); in xfs_trans_apply_sb_deltas() 1066 be64_add_cpu(&sbp->sb_frextents, tp->t_frextents_delta); in xfs_trans_apply_sb_deltas() 1068 be64_add_cpu(&sbp->sb_frextents, tp->t_res_frextents_delta); in xfs_trans_apply_sb_deltas() 1071 be64_add_cpu(&sbp->sb_dblocks, tp->t_dblocks_delta); in xfs_trans_apply_sb_deltas() 1075 be32_add_cpu(&sbp->sb_agcount, tp->t_agcount_delta); in xfs_trans_apply_sb_deltas() [all …]
|
D | xfs_super.c | 621 xfs_sb_t *sbp = &mp->m_sb; in xfs_set_inode32() local 623 xfs_agino_t agino = XFS_OFFBNO_TO_AGINO(mp, sbp->sb_agblocks -1, 0); in xfs_set_inode32() 624 xfs_ino_t ino = XFS_AGINO_TO_INO(mp, sbp->sb_agcount -1, agino); in xfs_set_inode32() 633 icount = sbp->sb_dblocks * sbp->sb_imax_pct; in xfs_set_inode32() 635 icount += sbp->sb_agblocks - 1; in xfs_set_inode32() 636 do_div(icount, sbp->sb_agblocks); in xfs_set_inode32() 639 max_metadata = sbp->sb_agcount; in xfs_set_inode32() 642 for (index = 0; index < sbp->sb_agcount; index++) { in xfs_set_inode32() 1103 xfs_sb_t *sbp = &mp->m_sb; in xfs_fs_statfs() local 1119 statp->f_bsize = sbp->sb_blocksize; in xfs_fs_statfs() [all …]
|
D | xfs_dfrag.c | 214 xfs_bstat_t *sbp = &sxp->sx_stat; in xfs_swap_extents() local 295 if ((sbp->bs_ctime.tv_sec != VFS_I(ip)->i_ctime.tv_sec) || in xfs_swap_extents() 296 (sbp->bs_ctime.tv_nsec != VFS_I(ip)->i_ctime.tv_nsec) || in xfs_swap_extents() 297 (sbp->bs_mtime.tv_sec != VFS_I(ip)->i_mtime.tv_sec) || in xfs_swap_extents() 298 (sbp->bs_mtime.tv_nsec != VFS_I(ip)->i_mtime.tv_nsec)) { in xfs_swap_extents()
|
D | xfs_attr_leaf.c | 784 xfs_attr_sf_sort_t *sbuf, *sbp; in xfs_attr_shortform_list() local 847 sbp = sbuf = kmem_alloc(sbsize, KM_SLEEP | KM_NOFS); in xfs_attr_shortform_list() 865 sbp->entno = i; in xfs_attr_shortform_list() 866 sbp->hash = xfs_da_hashname(sfe->nameval, sfe->namelen); in xfs_attr_shortform_list() 867 sbp->name = sfe->nameval; in xfs_attr_shortform_list() 868 sbp->namelen = sfe->namelen; in xfs_attr_shortform_list() 870 sbp->valuelen = sfe->valuelen; in xfs_attr_shortform_list() 871 sbp->flags = sfe->flags; in xfs_attr_shortform_list() 873 sbp++; in xfs_attr_shortform_list() 888 for (sbp = sbuf, i = 0; i < nsbuf; i++, sbp++) { in xfs_attr_shortform_list() [all …]
|
D | xfs_log_recover.c | 3968 xfs_sb_t *sbp; in xlog_do_recover() local 4015 sbp = &log->l_mp->m_sb; in xlog_do_recover() 4016 xfs_sb_from_disk(sbp, XFS_BUF_TO_SBP(bp)); in xlog_do_recover() 4017 ASSERT(sbp->sb_magicnum == XFS_SB_MAGIC); in xlog_do_recover() 4018 ASSERT(xfs_sb_good_version(sbp)); in xlog_do_recover()
|
/fs/nilfs2/ |
D | the_nilfs.c | 39 static int nilfs_valid_sb(struct nilfs_super_block *sbp); 111 struct nilfs_super_block **sbp = nilfs->ns_sbp; in nilfs_load_super_root() local 122 dat_entry_size = le16_to_cpu(sbp[0]->s_dat_entry_size); in nilfs_load_super_root() 123 checkpoint_size = le16_to_cpu(sbp[0]->s_checkpoint_size); in nilfs_load_super_root() 124 segment_usage_size = le16_to_cpu(sbp[0]->s_segment_usage_size); in nilfs_load_super_root() 182 struct nilfs_super_block *sbp) in nilfs_store_log_cursor() argument 186 nilfs->ns_last_pseg = le64_to_cpu(sbp->s_last_pseg); in nilfs_store_log_cursor() 187 nilfs->ns_last_cno = le64_to_cpu(sbp->s_last_cno); in nilfs_store_log_cursor() 188 nilfs->ns_last_seq = le64_to_cpu(sbp->s_last_seq); in nilfs_store_log_cursor() 233 struct nilfs_super_block **sbp = nilfs->ns_sbp; in load_nilfs() local [all …]
|
D | super.c | 81 struct nilfs_super_block **sbp; in nilfs_set_error() local 86 sbp = nilfs_prepare_super(sb, 0); in nilfs_set_error() 87 if (likely(sbp)) { in nilfs_set_error() 88 sbp[0]->s_state |= cpu_to_le16(NILFS_ERROR_FS); in nilfs_set_error() 89 if (sbp[1]) in nilfs_set_error() 90 sbp[1]->s_state |= cpu_to_le16(NILFS_ERROR_FS); in nilfs_set_error() 218 struct nilfs_super_block *sbp = nilfs->ns_sbp[0]; in nilfs_sync_super() local 237 sbp = nilfs->ns_sbp[1]; in nilfs_sync_super() 241 nilfs->ns_prot_seq = le64_to_cpu(sbp->s_last_seq); in nilfs_sync_super() 248 void nilfs_set_log_cursor(struct nilfs_super_block *sbp, in nilfs_set_log_cursor() argument [all …]
|
D | segment.c | 2268 struct nilfs_super_block **sbp; in nilfs_segctor_construct() local 2285 sbp = nilfs_prepare_super(sci->sc_super, in nilfs_segctor_construct() 2287 if (likely(sbp)) { in nilfs_segctor_construct() 2288 nilfs_set_log_cursor(sbp[0], nilfs); in nilfs_segctor_construct()
|
/fs/ufs/ |
D | swab.h | 26 fs64_to_cpu(struct super_block *sbp, __fs64 n) in fs64_to_cpu() argument 28 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) in fs64_to_cpu() 35 cpu_to_fs64(struct super_block *sbp, u64 n) in cpu_to_fs64() argument 37 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) in cpu_to_fs64() 44 fs32_to_cpu(struct super_block *sbp, __fs32 n) in fs32_to_cpu() argument 46 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) in fs32_to_cpu() 53 cpu_to_fs32(struct super_block *sbp, u32 n) in cpu_to_fs32() argument 55 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) in cpu_to_fs32() 62 fs32_add(struct super_block *sbp, __fs32 *n, int d) in fs32_add() argument 64 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) in fs32_add() [all …]
|
/fs/freevxfs/ |
D | vxfs_super.c | 78 vxfs_put_super(struct super_block *sbp) in vxfs_put_super() argument 80 struct vxfs_sb_info *infp = VXFS_SBI(sbp); in vxfs_put_super() 148 static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent) in vxfs_fill_super() argument 157 sbp->s_flags |= MS_RDONLY; in vxfs_fill_super() 165 bsize = sb_min_blocksize(sbp, BLOCK_SIZE); in vxfs_fill_super() 171 bp = sb_bread(sbp, 1); in vxfs_fill_super() 198 sbp->s_magic = rsbp->vs_magic; in vxfs_fill_super() 199 sbp->s_fs_info = infp; in vxfs_fill_super() 206 if (!sb_set_blocksize(sbp, rsbp->vs_bsize)) { in vxfs_fill_super() 211 if (vxfs_read_olt(sbp, bsize)) { in vxfs_fill_super() [all …]
|
D | vxfs_olt.c | 57 vxfs_oblock(struct super_block *sbp, daddr_t block, u_long bsize) in vxfs_oblock() argument 59 BUG_ON(sbp->s_blocksize % bsize); in vxfs_oblock() 60 return (block * (sbp->s_blocksize / bsize)); in vxfs_oblock() 77 vxfs_read_olt(struct super_block *sbp, u_long bsize) in vxfs_read_olt() argument 79 struct vxfs_sb_info *infp = VXFS_SBI(sbp); in vxfs_read_olt() 85 bp = sb_bread(sbp, vxfs_oblock(sbp, infp->vsi_oltext, bsize)); in vxfs_read_olt() 106 eaddr = bp->b_data + (infp->vsi_oltsize * sbp->s_blocksize); in vxfs_read_olt()
|
D | vxfs_inode.c | 88 vxfs_blkiget(struct super_block *sbp, u_long extent, ino_t ino) in vxfs_blkiget() argument 93 block = extent + ((ino * VXFS_ISIZE) / sbp->s_blocksize); in vxfs_blkiget() 94 offset = ((ino % (sbp->s_blocksize / VXFS_ISIZE)) * VXFS_ISIZE); in vxfs_blkiget() 95 bp = sb_bread(sbp, block); in vxfs_blkiget() 174 vxfs_stiget(struct super_block *sbp, ino_t ino) in vxfs_stiget() argument 178 vip = __vxfs_iget(ino, VXFS_SBI(sbp)->vsi_stilist); in vxfs_stiget() 258 vxfs_get_fake_inode(struct super_block *sbp, struct vxfs_inode_info *vip) in vxfs_get_fake_inode() argument 262 if ((ip = new_inode(sbp))) { in vxfs_get_fake_inode() 293 vxfs_iget(struct super_block *sbp, ino_t ino) in vxfs_iget() argument 299 ip = iget_locked(sbp, ino); in vxfs_iget() [all …]
|
D | vxfs_fshead.c | 107 vxfs_read_fshead(struct super_block *sbp) in vxfs_read_fshead() argument 109 struct vxfs_sb_info *infp = VXFS_SBI(sbp); in vxfs_read_fshead() 113 vip = vxfs_blkiget(sbp, infp->vsi_iext, infp->vsi_fshino); in vxfs_read_fshead() 130 infp->vsi_fship = vxfs_get_fake_inode(sbp, vip); in vxfs_read_fshead() 156 tip = vxfs_blkiget(sbp, infp->vsi_iext, sfp->fsh_ilistino[0]); in vxfs_read_fshead() 160 infp->vsi_stilist = vxfs_get_fake_inode(sbp, tip); in vxfs_read_fshead() 172 tip = vxfs_stiget(sbp, pfp->fsh_ilistino[0]); in vxfs_read_fshead() 175 infp->vsi_ilist = vxfs_get_fake_inode(sbp, tip); in vxfs_read_fshead()
|
D | vxfs_lookup.c | 48 #define VXFS_BLOCK_PER_PAGE(sbp) ((PAGE_CACHE_SIZE / (sbp)->s_blocksize)) argument 241 struct super_block *sbp = ip->i_sb; in vxfs_readdir() local 242 u_long bsize = sbp->s_blocksize; in vxfs_readdir() 266 pblocks = VXFS_BLOCK_PER_PAGE(sbp); in vxfs_readdir() 270 block = (u_long)(pos >> sbp->s_blocksize_bits) % pblocks; in vxfs_readdir()
|
D | vxfs_inode.h | 52 #define VXFS_TYPED_PER_BLOCK(sbp) \ argument 53 ((sbp)->s_blocksize / sizeof(struct vxfs_typed))
|
D | vxfs.h | 260 #define VXFS_SBI(sbp) \ argument 261 ((struct vxfs_sb_info *)(sbp)->s_fs_info)
|
/fs/reiserfs/ |
D | reiserfs.h | 88 #define sb_block_count(sbp) (le32_to_cpu((sbp)->s_v1.s_block_count)) argument 89 #define set_sb_block_count(sbp,v) ((sbp)->s_v1.s_block_count = cpu_to_le32(v)) argument 90 #define sb_free_blocks(sbp) (le32_to_cpu((sbp)->s_v1.s_free_blocks)) argument 91 #define set_sb_free_blocks(sbp,v) ((sbp)->s_v1.s_free_blocks = cpu_to_le32(v)) argument 92 #define sb_root_block(sbp) (le32_to_cpu((sbp)->s_v1.s_root_block)) argument 93 #define set_sb_root_block(sbp,v) ((sbp)->s_v1.s_root_block = cpu_to_le32(v)) argument 95 #define sb_jp_journal_1st_block(sbp) \ argument 96 (le32_to_cpu((sbp)->s_v1.s_journal.jp_journal_1st_block)) 97 #define set_sb_jp_journal_1st_block(sbp,v) \ argument 98 ((sbp)->s_v1.s_journal.jp_journal_1st_block = cpu_to_le32(v)) [all …]
|
/fs/ |
D | compat_ioctl.c | 238 compat_uptr_t sbp; /* [i], [*o] points to sense_buffer memory */ member 329 unsigned char __user *sbp; in sg_ioctl_trans() local 335 if (get_user(data, &sgio32->sbp)) in sg_ioctl_trans() 337 sbp = compat_ptr(data); in sg_ioctl_trans() 340 put_user(sbp, &sgio->sbp)) in sg_ioctl_trans()
|