Home
last modified time | relevance | path

Searched refs:sbp (Results 1 – 25 of 28) sorted by relevance

12

/fs/xfs/libxfs/
Dxfs_sb.c97 struct xfs_sb *sbp) in xfs_validate_sb_read() argument
99 if (XFS_SB_VERSION_NUM(sbp) != XFS_SB_VERSION_5) in xfs_validate_sb_read()
106 if (xfs_sb_has_compat_feature(sbp, XFS_SB_FEAT_COMPAT_UNKNOWN)) { in xfs_validate_sb_read()
109 (sbp->sb_features_compat & XFS_SB_FEAT_COMPAT_UNKNOWN)); in xfs_validate_sb_read()
114 if (xfs_sb_has_ro_compat_feature(sbp, XFS_SB_FEAT_RO_COMPAT_UNKNOWN)) { in xfs_validate_sb_read()
117 (sbp->sb_features_ro_compat & in xfs_validate_sb_read()
128 if (xfs_sb_has_incompat_feature(sbp, XFS_SB_FEAT_INCOMPAT_UNKNOWN)) { in xfs_validate_sb_read()
131 (sbp->sb_features_incompat & in xfs_validate_sb_read()
146 struct xfs_sb *sbp) in xfs_validate_sb_write() argument
158 if (XFS_BUF_ADDR(bp) == XFS_SB_DADDR && !sbp->sb_inprogress && in xfs_validate_sb_write()
[all …]
Dxfs_format.h281 #define XFS_SB_VERSION_NUM(sbp) ((sbp)->sb_versionnum & XFS_SB_VERSION_NUMBITS) argument
286 static inline bool xfs_sb_good_v4_features(struct xfs_sb *sbp) in xfs_sb_good_v4_features() argument
288 if (!(sbp->sb_versionnum & XFS_SB_VERSION_DIRV2BIT)) in xfs_sb_good_v4_features()
290 if (!(sbp->sb_versionnum & XFS_SB_VERSION_EXTFLGBIT)) in xfs_sb_good_v4_features()
294 if ((sbp->sb_versionnum & ~XFS_SB_VERSION_OKBITS) || in xfs_sb_good_v4_features()
295 ((sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && in xfs_sb_good_v4_features()
296 (sbp->sb_features2 & ~XFS_SB_VERSION2_OKBITS))) in xfs_sb_good_v4_features()
302 static inline bool xfs_sb_good_version(struct xfs_sb *sbp) in xfs_sb_good_version() argument
304 if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) in xfs_sb_good_version()
306 if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) in xfs_sb_good_version()
[all …]
Dxfs_sb.h28 extern void xfs_sb_mount_common(struct xfs_mount *mp, struct xfs_sb *sbp);
31 extern void xfs_sb_quota_from_disk(struct xfs_sb *sbp);
36 extern void xfs_fs_geometry(struct xfs_sb *sbp, struct xfs_fsop_geom *geo,
Dxfs_da_format.h867 static inline unsigned int xfs_dir2_dirblock_bytes(struct xfs_sb *sbp) in xfs_dir2_dirblock_bytes() argument
869 return 1 << (sbp->sb_blocklog + sbp->sb_dirblklog); in xfs_dir2_dirblock_bytes()
Dxfs_ialloc.c2764 struct xfs_sb *sbp = &mp->m_sb; in xfs_ialloc_setup_geometry() local
2770 igeo->agino_log = sbp->sb_inopblog + sbp->sb_agblklog; in xfs_ialloc_setup_geometry()
2771 igeo->inobt_mxr[0] = xfs_inobt_maxrecs(mp, sbp->sb_blocksize, 1); in xfs_ialloc_setup_geometry()
2772 igeo->inobt_mxr[1] = xfs_inobt_maxrecs(mp, sbp->sb_blocksize, 0); in xfs_ialloc_setup_geometry()
2777 sbp->sb_inopblock); in xfs_ialloc_setup_geometry()
2778 igeo->ialloc_blks = igeo->ialloc_inos >> sbp->sb_inopblog; in xfs_ialloc_setup_geometry()
2780 if (sbp->sb_spino_align) in xfs_ialloc_setup_geometry()
2781 igeo->ialloc_min_blks = sbp->sb_spino_align; in xfs_ialloc_setup_geometry()
2796 if (sbp->sb_imax_pct && igeo->ialloc_blks) { in xfs_ialloc_setup_geometry()
2801 icount = sbp->sb_dblocks * sbp->sb_imax_pct; in xfs_ialloc_setup_geometry()
/fs/nilfs2/
Dthe_nilfs.c26 static int nilfs_valid_sb(struct nilfs_super_block *sbp);
101 struct nilfs_super_block **sbp = nilfs->ns_sbp; in nilfs_load_super_root() local
112 dat_entry_size = le16_to_cpu(sbp[0]->s_dat_entry_size); in nilfs_load_super_root()
113 checkpoint_size = le16_to_cpu(sbp[0]->s_checkpoint_size); in nilfs_load_super_root()
114 segment_usage_size = le16_to_cpu(sbp[0]->s_segment_usage_size); in nilfs_load_super_root()
172 struct nilfs_super_block *sbp) in nilfs_store_log_cursor() argument
176 nilfs->ns_last_pseg = le64_to_cpu(sbp->s_last_pseg); in nilfs_store_log_cursor()
177 nilfs->ns_last_cno = le64_to_cpu(sbp->s_last_cno); in nilfs_store_log_cursor()
178 nilfs->ns_last_seq = le64_to_cpu(sbp->s_last_seq); in nilfs_store_log_cursor()
226 struct nilfs_super_block **sbp = nilfs->ns_sbp; in load_nilfs() local
[all …]
Dsuper.c84 struct nilfs_super_block **sbp; in nilfs_set_error() local
89 sbp = nilfs_prepare_super(sb, 0); in nilfs_set_error()
90 if (likely(sbp)) { in nilfs_set_error()
91 sbp[0]->s_state |= cpu_to_le16(NILFS_ERROR_FS); in nilfs_set_error()
92 if (sbp[1]) in nilfs_set_error()
93 sbp[1]->s_state |= cpu_to_le16(NILFS_ERROR_FS); in nilfs_set_error()
194 struct nilfs_super_block *sbp = nilfs->ns_sbp[0]; in nilfs_sync_super() local
213 sbp = nilfs->ns_sbp[1]; in nilfs_sync_super()
217 nilfs->ns_prot_seq = le64_to_cpu(sbp->s_last_seq); in nilfs_sync_super()
224 void nilfs_set_log_cursor(struct nilfs_super_block *sbp, in nilfs_set_log_cursor() argument
[all …]
Dsysfs.c848 struct nilfs_super_block **sbp = nilfs->ns_sbp; in nilfs_dev_revision_show() local
849 u32 major = le32_to_cpu(sbp[0]->s_rev_level); in nilfs_dev_revision_show()
850 u16 minor = le16_to_cpu(sbp[0]->s_minor_rev_level); in nilfs_dev_revision_show()
868 struct nilfs_super_block **sbp = nilfs->ns_sbp; in nilfs_dev_device_size_show() local
869 u64 dev_size = le64_to_cpu(sbp[0]->s_dev_size); in nilfs_dev_device_size_show()
891 struct nilfs_super_block **sbp = nilfs->ns_sbp; in nilfs_dev_uuid_show() local
893 return snprintf(buf, PAGE_SIZE, "%pUb\n", sbp[0]->s_uuid); in nilfs_dev_uuid_show()
901 struct nilfs_super_block **sbp = nilfs->ns_sbp; in nilfs_dev_volume_name_show() local
903 return scnprintf(buf, sizeof(sbp[0]->s_volume_name), "%s\n", in nilfs_dev_volume_name_show()
904 sbp[0]->s_volume_name); in nilfs_dev_volume_name_show()
/fs/ufs/
Dswab.h27 fs64_to_cpu(struct super_block *sbp, __fs64 n) in fs64_to_cpu() argument
29 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) in fs64_to_cpu()
36 cpu_to_fs64(struct super_block *sbp, u64 n) in cpu_to_fs64() argument
38 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) in cpu_to_fs64()
45 fs32_to_cpu(struct super_block *sbp, __fs32 n) in fs32_to_cpu() argument
47 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) in fs32_to_cpu()
54 cpu_to_fs32(struct super_block *sbp, u32 n) in cpu_to_fs32() argument
56 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) in cpu_to_fs32()
63 fs32_add(struct super_block *sbp, __fs32 *n, int d) in fs32_add() argument
65 if (UFS_SB(sbp)->s_bytesex == BYTESEX_LE) in fs32_add()
[all …]
/fs/freevxfs/
Dvxfs_super.c68 vxfs_put_super(struct super_block *sbp) in vxfs_put_super() argument
70 struct vxfs_sb_info *infp = VXFS_SBI(sbp); in vxfs_put_super()
148 static int vxfs_try_sb_magic(struct super_block *sbp, int silent, in vxfs_try_sb_magic() argument
153 struct vxfs_sb_info *infp = VXFS_SBI(sbp); in vxfs_try_sb_magic()
156 bp = sb_bread(sbp, blk); in vxfs_try_sb_magic()
207 static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent) in vxfs_fill_super() argument
216 sbp->s_flags |= SB_RDONLY; in vxfs_fill_super()
224 bsize = sb_min_blocksize(sbp, BLOCK_SIZE); in vxfs_fill_super()
230 sbp->s_op = &vxfs_super_ops; in vxfs_fill_super()
231 sbp->s_fs_info = infp; in vxfs_fill_super()
[all …]
Dvxfs_olt.c57 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()
84 bp = sb_bread(sbp, vxfs_oblock(sbp, infp->vsi_oltext, bsize)); in vxfs_read_olt()
105 eaddr = bp->b_data + (infp->vsi_oltsize * sbp->s_blocksize); in vxfs_read_olt()
Dvxfs_inode.c164 vxfs_blkiget(struct super_block *sbp, u_long extent, ino_t ino) in vxfs_blkiget() argument
170 inode = new_inode(sbp); in vxfs_blkiget()
175 block = extent + ((ino * VXFS_ISIZE) / sbp->s_blocksize); in vxfs_blkiget()
176 offset = ((ino % (sbp->s_blocksize / VXFS_ISIZE)) * VXFS_ISIZE); in vxfs_blkiget()
177 bp = sb_bread(sbp, block); in vxfs_blkiget()
184 dip2vip_cpy(VXFS_SBI(sbp), vip, dip); in vxfs_blkiget()
249 vxfs_stiget(struct super_block *sbp, ino_t ino) in vxfs_stiget() argument
254 inode = new_inode(sbp); in vxfs_stiget()
259 error = __vxfs_iget(VXFS_SBI(sbp)->vsi_stilist, VXFS_INO(inode), ino); in vxfs_stiget()
278 vxfs_iget(struct super_block *sbp, ino_t ino) in vxfs_iget() argument
[all …]
Dvxfs_fshead.c108 vxfs_read_fshead(struct super_block *sbp) in vxfs_read_fshead() argument
110 struct vxfs_sb_info *infp = VXFS_SBI(sbp); in vxfs_read_fshead()
114 infp->vsi_fship = vxfs_blkiget(sbp, infp->vsi_iext, infp->vsi_fshino); in vxfs_read_fshead()
152 infp->vsi_stilist = vxfs_blkiget(sbp, infp->vsi_iext, in vxfs_read_fshead()
164 infp->vsi_ilist = vxfs_stiget(sbp, fs32_to_cpu(infp, pfp->fsh_ilistino[0])); in vxfs_read_fshead()
Dvxfs_lookup.c49 #define VXFS_BLOCK_PER_PAGE(sbp) ((PAGE_SIZE / (sbp)->s_blocksize)) argument
218 struct super_block *sbp = ip->i_sb; in vxfs_readdir() local
219 u_long bsize = sbp->s_blocksize; in vxfs_readdir()
221 struct vxfs_sb_info *sbi = VXFS_SBI(sbp); in vxfs_readdir()
Dvxfs_inode.h53 #define VXFS_TYPED_PER_BLOCK(sbp) \ argument
54 ((sbp)->s_blocksize / sizeof(struct vxfs_typed))
Dvxfs.h279 #define VXFS_SBI(sbp) \ argument
280 ((struct vxfs_sb_info *)(sbp)->s_fs_info)
/fs/xfs/
Dxfs_mount.c162 xfs_sb_t *sbp, in xfs_sb_validate_fsb_count() argument
165 ASSERT(PAGE_SHIFT >= sbp->sb_blocklog); in xfs_sb_validate_fsb_count()
166 ASSERT(sbp->sb_blocklog >= BBSHIFT); in xfs_sb_validate_fsb_count()
169 if (nblocks >> (PAGE_SHIFT - sbp->sb_blocklog) > ULONG_MAX) in xfs_sb_validate_fsb_count()
273 struct xfs_sb *sbp = &mp->m_sb; in xfs_readsb() local
313 xfs_sb_from_disk(sbp, XFS_BUF_TO_SBP(bp)); in xfs_readsb()
319 if (sbp->sb_magicnum != XFS_SB_MAGIC) { in xfs_readsb()
329 if (sector_size > sbp->sb_sectsize) { in xfs_readsb()
332 sector_size, sbp->sb_sectsize); in xfs_readsb()
343 sector_size = sbp->sb_sectsize; in xfs_readsb()
[all …]
Dxfs_rtalloc.c899 xfs_sb_t *sbp; /* old superblock */ in xfs_growfs_rt() local
903 sbp = &mp->m_sb; in xfs_growfs_rt()
910 (nrblocks = in->newblocks) <= sbp->sb_rblocks || in xfs_growfs_rt()
911 (sbp->sb_rblocks && (in->extsize != sbp->sb_rextsize))) in xfs_growfs_rt()
913 if ((error = xfs_sb_validate_fsb_count(sbp, nrblocks))) in xfs_growfs_rt()
930 nrbmblocks = howmany_64(nrextents, NBBY * sbp->sb_blocksize); in xfs_growfs_rt()
960 if (nrbmblocks != sbp->sb_rbmblocks) in xfs_growfs_rt()
973 for (bmbno = sbp->sb_rbmblocks - in xfs_growfs_rt()
974 ((sbp->sb_rextents & ((1 << mp->m_blkbit_log) - 1)) != 0); in xfs_growfs_rt()
1032 if (sbp->sb_rbmblocks != nsbp->sb_rbmblocks || in xfs_growfs_rt()
[all …]
Dxfs_attr_list.c55 xfs_attr_sf_sort_t *sbuf, *sbp; in xfs_attr_shortform_list() local
112 sbp = sbuf = kmem_alloc(sbsize, KM_NOFS); in xfs_attr_shortform_list()
131 sbp->entno = i; in xfs_attr_shortform_list()
132 sbp->hash = xfs_da_hashname(sfe->nameval, sfe->namelen); in xfs_attr_shortform_list()
133 sbp->name = sfe->nameval; in xfs_attr_shortform_list()
134 sbp->namelen = sfe->namelen; in xfs_attr_shortform_list()
136 sbp->valuelen = sfe->valuelen; in xfs_attr_shortform_list()
137 sbp->flags = sfe->flags; in xfs_attr_shortform_list()
139 sbp++; in xfs_attr_shortform_list()
154 for (sbp = sbuf, i = 0; i < nsbuf; i++, sbp++) { in xfs_attr_shortform_list()
[all …]
Dxfs_trans.c448 xfs_dsb_t *sbp; in xfs_trans_apply_sb_deltas() local
453 sbp = XFS_BUF_TO_SBP(bp); in xfs_trans_apply_sb_deltas()
467 be64_add_cpu(&sbp->sb_icount, tp->t_icount_delta); in xfs_trans_apply_sb_deltas()
469 be64_add_cpu(&sbp->sb_ifree, tp->t_ifree_delta); in xfs_trans_apply_sb_deltas()
471 be64_add_cpu(&sbp->sb_fdblocks, tp->t_fdblocks_delta); in xfs_trans_apply_sb_deltas()
473 be64_add_cpu(&sbp->sb_fdblocks, tp->t_res_fdblocks_delta); in xfs_trans_apply_sb_deltas()
477 be64_add_cpu(&sbp->sb_frextents, tp->t_frextents_delta); in xfs_trans_apply_sb_deltas()
479 be64_add_cpu(&sbp->sb_frextents, tp->t_res_frextents_delta); in xfs_trans_apply_sb_deltas()
482 be64_add_cpu(&sbp->sb_dblocks, tp->t_dblocks_delta); in xfs_trans_apply_sb_deltas()
486 be32_add_cpu(&sbp->sb_agcount, tp->t_agcount_delta); in xfs_trans_apply_sb_deltas()
[all …]
Dxfs_super.c563 xfs_sb_t *sbp = &mp->m_sb; in xfs_set_inode_alloc() local
575 icount = sbp->sb_dblocks * sbp->sb_imax_pct; in xfs_set_inode_alloc()
577 icount += sbp->sb_agblocks - 1; in xfs_set_inode_alloc()
578 do_div(icount, sbp->sb_agblocks); in xfs_set_inode_alloc()
585 agino = XFS_AGB_TO_AGINO(mp, sbp->sb_agblocks - 1); in xfs_set_inode_alloc()
1082 xfs_sb_t *sbp = &mp->m_sb; in xfs_fs_statfs() local
1103 statp->f_bsize = sbp->sb_blocksize; in xfs_fs_statfs()
1104 lsize = sbp->sb_logstart ? sbp->sb_logblocks : 0; in xfs_fs_statfs()
1105 statp->f_blocks = sbp->sb_dblocks - lsize; in xfs_fs_statfs()
1121 sbp->sb_icount); in xfs_fs_statfs()
[all …]
Dxfs_ioctl.c2019 struct xfs_sb *sbp = &mp->m_sb; in xfs_ioc_getlabel() local
2023 BUILD_BUG_ON(sizeof(sbp->sb_fname) > FSLABEL_MAX); in xfs_ioc_getlabel()
2028 strncpy(label, sbp->sb_fname, XFSLABEL_MAX); in xfs_ioc_getlabel()
2042 struct xfs_sb *sbp = &mp->m_sb; in xfs_ioc_setlabel() local
2058 if (len > sizeof(sbp->sb_fname)) in xfs_ioc_setlabel()
2066 memset(sbp->sb_fname, 0, sizeof(sbp->sb_fname)); in xfs_ioc_setlabel()
2067 memcpy(sbp->sb_fname, label, len); in xfs_ioc_setlabel()
Dxfs_bmap_util.c1724 struct xfs_bstat *sbp = &sxp->sx_stat; in xfs_swap_extents() local
1836 if ((sbp->bs_ctime.tv_sec != VFS_I(ip)->i_ctime.tv_sec) || in xfs_swap_extents()
1837 (sbp->bs_ctime.tv_nsec != VFS_I(ip)->i_ctime.tv_nsec) || in xfs_swap_extents()
1838 (sbp->bs_mtime.tv_sec != VFS_I(ip)->i_mtime.tv_sec) || in xfs_swap_extents()
1839 (sbp->bs_mtime.tv_nsec != VFS_I(ip)->i_mtime.tv_nsec)) { in xfs_swap_extents()
/fs/reiserfs/
Dreiserfs.h116 #define sb_block_count(sbp) (le32_to_cpu((sbp)->s_v1.s_block_count)) argument
117 #define set_sb_block_count(sbp,v) ((sbp)->s_v1.s_block_count = cpu_to_le32(v)) argument
118 #define sb_free_blocks(sbp) (le32_to_cpu((sbp)->s_v1.s_free_blocks)) argument
119 #define set_sb_free_blocks(sbp,v) ((sbp)->s_v1.s_free_blocks = cpu_to_le32(v)) argument
120 #define sb_root_block(sbp) (le32_to_cpu((sbp)->s_v1.s_root_block)) argument
121 #define set_sb_root_block(sbp,v) ((sbp)->s_v1.s_root_block = cpu_to_le32(v)) argument
123 #define sb_jp_journal_1st_block(sbp) \ argument
124 (le32_to_cpu((sbp)->s_v1.s_journal.jp_journal_1st_block))
125 #define set_sb_jp_journal_1st_block(sbp,v) \ argument
126 ((sbp)->s_v1.s_journal.jp_journal_1st_block = cpu_to_le32(v))
[all …]
/fs/
Dcompat_ioctl.c104 compat_uptr_t sbp; /* [i], [*o] points to sense_buffer memory */ member
195 unsigned char __user *sbp; in sg_ioctl_trans() local
201 if (get_user(data, &sgio32->sbp)) in sg_ioctl_trans()
203 sbp = compat_ptr(data); in sg_ioctl_trans()
206 put_user(sbp, &sgio->sbp)) in sg_ioctl_trans()

12