/fs/xfs/ |
D | xfs_dir2_readdir.c | 71 struct xfs_da_geometry *geo = args->geo; in xfs_dir2_sf_getdents() local 82 if (xfs_dir2_dataptr_to_db(geo, ctx->pos) > geo->datablk) in xfs_dir2_sf_getdents() 91 dot_offset = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, in xfs_dir2_sf_getdents() 93 dotdot_offset = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, in xfs_dir2_sf_getdents() 122 off = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, in xfs_dir2_sf_getdents() 139 ctx->pos = xfs_dir2_db_off_to_dataptr(geo, geo->datablk + 1, 0) & in xfs_dir2_sf_getdents() 163 struct xfs_da_geometry *geo = args->geo; in xfs_dir2_block_getdents() local 169 if (xfs_dir2_dataptr_to_db(geo, ctx->pos) > geo->datablk) in xfs_dir2_block_getdents() 182 wantoff = xfs_dir2_dataptr_to_off(geo, ctx->pos); in xfs_dir2_block_getdents() 188 btp = xfs_dir2_block_tail_p(geo, hdr); in xfs_dir2_block_getdents() [all …]
|
D | xfs_fsops.c | 55 xfs_fsop_geom_t *geo, in xfs_fs_geometry() argument 59 memset(geo, 0, sizeof(*geo)); in xfs_fs_geometry() 61 geo->blocksize = mp->m_sb.sb_blocksize; in xfs_fs_geometry() 62 geo->rtextsize = mp->m_sb.sb_rextsize; in xfs_fs_geometry() 63 geo->agblocks = mp->m_sb.sb_agblocks; in xfs_fs_geometry() 64 geo->agcount = mp->m_sb.sb_agcount; in xfs_fs_geometry() 65 geo->logblocks = mp->m_sb.sb_logblocks; in xfs_fs_geometry() 66 geo->sectsize = mp->m_sb.sb_sectsize; in xfs_fs_geometry() 67 geo->inodesize = mp->m_sb.sb_inodesize; in xfs_fs_geometry() 68 geo->imaxpct = mp->m_sb.sb_imax_pct; in xfs_fs_geometry() [all …]
|
D | xfs_fsops.h | 21 extern int xfs_fs_geometry(xfs_mount_t *mp, xfs_fsop_geom_t *geo, int nversion);
|
/fs/xfs/libxfs/ |
D | xfs_dir2.h | 91 int (*leaf_max_ents)(struct xfs_da_geometry *geo); 108 int (*free_max_bests)(struct xfs_da_geometry *geo); 110 xfs_dir2_db_t (*db_to_fdb)(struct xfs_da_geometry *geo, 112 int (*db_to_fdindex)(struct xfs_da_geometry *geo, 162 extern void xfs_dir2_data_freescan_int(struct xfs_da_geometry *geo, 221 xfs_dir2_byte_to_db(struct xfs_da_geometry *geo, xfs_dir2_off_t by) in xfs_dir2_byte_to_db() argument 223 return (xfs_dir2_db_t)(by >> geo->blklog); in xfs_dir2_byte_to_db() 230 xfs_dir2_dataptr_to_db(struct xfs_da_geometry *geo, xfs_dir2_dataptr_t dp) in xfs_dir2_dataptr_to_db() argument 232 return xfs_dir2_byte_to_db(geo, xfs_dir2_dataptr_to_byte(dp)); in xfs_dir2_dataptr_to_db() 239 xfs_dir2_byte_to_off(struct xfs_da_geometry *geo, xfs_dir2_off_t by) in xfs_dir2_byte_to_off() argument [all …]
|
D | xfs_attr_leaf.c | 108 struct xfs_da_geometry *geo, in xfs_attr3_leaf_firstused_from_disk() argument 128 ASSERT(geo->blksize > USHRT_MAX); in xfs_attr3_leaf_firstused_from_disk() 129 to->firstused = geo->blksize; in xfs_attr3_leaf_firstused_from_disk() 135 struct xfs_da_geometry *geo, in xfs_attr3_leaf_firstused_to_disk() argument 152 ASSERT(from->firstused == geo->blksize); in xfs_attr3_leaf_firstused_to_disk() 166 struct xfs_da_geometry *geo, in xfs_attr3_leaf_hdr_from_disk() argument 183 xfs_attr3_leaf_firstused_from_disk(geo, to, from); in xfs_attr3_leaf_hdr_from_disk() 197 xfs_attr3_leaf_firstused_from_disk(geo, to, from); in xfs_attr3_leaf_hdr_from_disk() 208 struct xfs_da_geometry *geo, in xfs_attr3_leaf_hdr_to_disk() argument 225 xfs_attr3_leaf_firstused_to_disk(geo, to, from); in xfs_attr3_leaf_hdr_to_disk() [all …]
|
D | xfs_dir2_leaf.c | 95 struct xfs_da_geometry *geo = mp->m_dir_geo; in xfs_dir3_leaf_check_int() local 109 ltp = xfs_dir2_leaf_tail_p(geo, leaf); in xfs_dir3_leaf_check_int() 116 if (hdr->count > ops->leaf_max_ents(geo)) in xfs_dir3_leaf_check_int() 355 ASSERT(bno >= xfs_dir2_byte_to_db(args->geo, XFS_DIR2_LEAF_OFFSET) && in xfs_dir3_leaf_get_buf() 356 bno < xfs_dir2_byte_to_db(args->geo, XFS_DIR2_FREE_OFFSET)); in xfs_dir3_leaf_get_buf() 358 error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(args->geo, bno), in xfs_dir3_leaf_get_buf() 409 ldb = xfs_dir2_da_to_db(args->geo, blkno); in xfs_dir2_block_to_leaf() 410 ASSERT(ldb == xfs_dir2_byte_to_db(args->geo, XFS_DIR2_LEAF_OFFSET)); in xfs_dir2_block_to_leaf() 421 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_to_leaf() 449 (xfs_dir2_data_aoff_t)((char *)hdr + args->geo->blksize - in xfs_dir2_block_to_leaf() [all …]
|
D | xfs_da_format.c | 422 xfs_dir2_max_leaf_ents(struct xfs_da_geometry *geo) in xfs_dir2_max_leaf_ents() argument 424 return (geo->blksize - sizeof(struct xfs_dir2_leaf_hdr)) / in xfs_dir2_max_leaf_ents() 435 xfs_dir3_max_leaf_ents(struct xfs_da_geometry *geo) in xfs_dir3_max_leaf_ents() argument 437 return (geo->blksize - sizeof(struct xfs_dir3_leaf_hdr)) / in xfs_dir3_max_leaf_ents() 588 xfs_dir2_free_max_bests(struct xfs_da_geometry *geo) in xfs_dir2_free_max_bests() argument 590 return (geo->blksize - sizeof(struct xfs_dir2_free_hdr)) / in xfs_dir2_free_max_bests() 604 xfs_dir2_db_to_fdb(struct xfs_da_geometry *geo, xfs_dir2_db_t db) in xfs_dir2_db_to_fdb() argument 606 return xfs_dir2_byte_to_db(geo, XFS_DIR2_FREE_OFFSET) + in xfs_dir2_db_to_fdb() 607 (db / xfs_dir2_free_max_bests(geo)); in xfs_dir2_db_to_fdb() 614 xfs_dir2_db_to_fdindex(struct xfs_da_geometry *geo, xfs_dir2_db_t db) in xfs_dir2_db_to_fdindex() argument [all …]
|
D | xfs_dir2.c | 251 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_init() 289 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_createname() 387 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_lookup() 461 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_removename() 526 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_replace() 604 count = args->geo->fsbcount; in xfs_dir2_grow_inode() 610 *dbp = xfs_dir2_da_to_db(args->geo, (xfs_dablk_t)bno); in xfs_dir2_grow_inode() 640 rval = XFS_FSB_TO_B(args->dp->i_mount, last) == args->geo->blksize; in xfs_dir2_isblock() 641 if (rval != 0 && args->dp->i_d.di_size != args->geo->blksize) in xfs_dir2_isblock() 660 *vp = last == args->geo->leafblk + args->geo->fsbcount; in xfs_dir2_isleaf() [all …]
|
D | xfs_dir2_node.c | 258 error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(args->geo, fbno), in xfs_dir3_free_get_buf() 365 ASSERT(fdb == xfs_dir2_byte_to_db(args->geo, XFS_DIR2_FREE_OFFSET)); in xfs_dir2_leaf_to_node() 376 ltp = xfs_dir2_leaf_tail_p(args->geo, leaf); in xfs_dir2_leaf_to_node() 378 (uint)dp->i_d.di_size / args->geo->blksize); in xfs_dir2_leaf_to_node() 461 if (leafhdr.count == dp->d_ops->leaf_max_ents(args->geo)) { in xfs_dir2_leafn_add() 496 lep->address = cpu_to_be32(xfs_dir2_db_off_to_dataptr(args->geo, in xfs_dir2_leafn_add() 625 newdb = xfs_dir2_dataptr_to_db(args->geo, in xfs_dir2_leafn_lookup_for_addname() 643 newfdb = dp->d_ops->db_to_fdb(args->geo, newdb); in xfs_dir2_leafn_lookup_for_addname() 655 xfs_dir2_db_to_da(args->geo, in xfs_dir2_leafn_lookup_for_addname() 667 fi = dp->d_ops->db_to_fdindex(args->geo, curdb); in xfs_dir2_leafn_lookup_for_addname() [all …]
|
D | xfs_dir2_block.c | 378 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_addname() 632 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_lookup() 638 xfs_dir2_dataptr_to_off(args->geo, in xfs_dir2_block_lookup() 685 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_lookup_int() 723 ((char *)hdr + xfs_dir2_dataptr_to_off(args->geo, addr)); in xfs_dir2_block_lookup_int() 788 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_removename() 794 xfs_dir2_dataptr_to_off(args->geo, in xfs_dir2_block_removename() 862 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_replace() 868 xfs_dir2_dataptr_to_off(args->geo, in xfs_dir2_block_replace() 936 ltp = xfs_dir2_leaf_tail_p(args->geo, leaf); in xfs_dir2_leaf_to_block() [all …]
|
D | xfs_dir2_data.c | 65 struct xfs_da_geometry *geo; in __xfs_dir3_data_check() local 68 geo = mp->m_dir_geo; in __xfs_dir3_data_check() 82 btp = xfs_dir2_block_tail_p(geo, hdr); in __xfs_dir3_data_check() 98 endp = (char *)hdr + geo->blksize; in __xfs_dir3_data_check() 180 addr = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, in __xfs_dir3_data_check() 513 struct xfs_da_geometry *geo, in xfs_dir2_data_freescan_int() argument 542 btp = xfs_dir2_block_tail_p(geo, hdr); in xfs_dir2_data_freescan_int() 545 endp = (char *)hdr + geo->blksize; in xfs_dir2_data_freescan_int() 609 error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(args->geo, blkno), in xfs_dir3_data_init() 645 t = args->geo->blksize - (uint)dp->d_ops->data_entry_offset; in xfs_dir3_data_init() [all …]
|
D | xfs_da_btree.c | 602 (args->whichfork == XFS_DATA_FORK) ? args->geo->leafblk : 0, in xfs_da3_root_split() 620 ASSERT(blk1->blkno >= args->geo->leafblk && in xfs_da3_root_split() 621 blk1->blkno < args->geo->freeblk); in xfs_da3_root_split() 622 ASSERT(blk2->blkno >= args->geo->leafblk && in xfs_da3_root_split() 623 blk2->blkno < args->geo->freeblk); in xfs_da3_root_split() 667 if (nodehdr.count + newcount > state->args->geo->node_ents) { in xfs_da3_node_split() 898 ASSERT(newblk->blkno >= state->args->geo->leafblk && in xfs_da3_node_add() 899 newblk->blkno < state->args->geo->freeblk); in xfs_da3_node_add() 1093 memcpy(root_blk->bp->b_addr, bp->b_addr, args->geo->blksize); in xfs_da3_root_join() 1101 args->geo->blksize - 1); in xfs_da3_root_join() [all …]
|
D | xfs_attr_leaf.h | 101 void xfs_attr3_leaf_hdr_from_disk(struct xfs_da_geometry *geo, 104 void xfs_attr3_leaf_hdr_to_disk(struct xfs_da_geometry *geo,
|
D | xfs_dir2_sf.c | 81 struct xfs_da_geometry *geo; in xfs_dir2_block_sfsize() local 84 geo = mp->m_dir_geo; in xfs_dir2_block_sfsize() 93 btp = xfs_dir2_block_tail_p(geo, hdr); in xfs_dir2_block_sfsize() 106 xfs_dir2_dataptr_to_off(geo, addr)); in xfs_dir2_block_sfsize() 195 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_to_sf() 247 error = xfs_dir2_shrink_inode(args, args->geo->datablk, bp); in xfs_dir2_block_to_sf() 570 if (used + (holefit ? 0 : size) > args->geo->blksize) in xfs_dir2_sf_addname_pick() 580 if (used + size > args->geo->blksize) in xfs_dir2_sf_addname_pick() 628 (uint)sizeof(xfs_dir2_block_tail_t) <= args->geo->blksize); in xfs_dir2_sf_check()
|
D | xfs_da_btree.h | 62 struct xfs_da_geometry *geo; /* da block geometry */ member
|
D | xfs_attr.c | 89 args->geo = dp->i_mount->m_attr_geo; in xfs_attr_args_init() 189 if (size > (args->geo->blksize / 2)) { in xfs_attr_calc_size()
|
D | xfs_bmap.c | 1049 dargs.geo = ip->i_mount->m_dir_geo; in xfs_bmap_add_attrfork_local() 1053 dargs.total = dargs.geo->fsbcount; in xfs_bmap_add_attrfork_local()
|