/fs/quota/ |
D | quota_tree.c | 52 static ssize_t read_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf) in read_blk() argument 58 info->dqi_usable_bs, blk << info->dqi_blocksize_bits); in read_blk() 61 static ssize_t write_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf) in write_blk() argument 67 info->dqi_usable_bs, blk << info->dqi_blocksize_bits); in write_blk() 81 int ret, blk; in get_free_dqblk() local 86 blk = info->dqi_free_blk; in get_free_dqblk() 87 ret = read_blk(info, blk, buf); in get_free_dqblk() 98 blk = info->dqi_blocks++; in get_free_dqblk() 101 ret = blk; in get_free_dqblk() 108 static int put_free_dqblk(struct qtree_mem_dqinfo *info, char *buf, uint blk) in put_free_dqblk() argument [all …]
|
/fs/affs/ |
D | bitmap.c | 43 u32 blk, bmap, bit, mask, tmp; in affs_free_block() local 51 blk = block - sbi->s_reserved; in affs_free_block() 52 bmap = blk / sbi->s_bmap_bits; in affs_free_block() 53 bit = blk % sbi->s_bmap_bits; in affs_free_block() 122 u32 blk, bmap, bit, mask, mask2, tmp; in affs_alloc_block() local 144 blk = goal - sbi->s_reserved; in affs_alloc_block() 145 bmap = blk / sbi->s_bmap_bits; in affs_alloc_block() 167 blk = bmap * sbi->s_bmap_bits; in affs_alloc_block() 182 bit = blk % sbi->s_bmap_bits; in affs_alloc_block() 186 blk &= ~31UL; in affs_alloc_block() [all …]
|
D | file.c | 820 u32 last_blk, blkcnt, blk; in affs_truncate() local 876 blk = last_blk; in affs_truncate() 879 blk++; in affs_truncate() 884 if (size > blkcnt - blk + i) in affs_truncate() 885 size = blkcnt - blk + i; in affs_truncate() 886 for (; i < size; i++, blk++) { in affs_truncate() 921 if (size > blkcnt - blk) in affs_truncate() 922 size = blkcnt - blk; in affs_truncate() 923 for (i = 0; i < size; i++, blk++) in affs_truncate()
|
/fs/xfs/ |
D | xfs_attr.c | 1209 xfs_da_state_blk_t *blk; in xfs_attr_node_addname() local 1235 blk = &state->path.blk[ state->path.active-1 ]; in xfs_attr_node_addname() 1236 ASSERT(blk->magic == XFS_ATTR_LEAF_MAGIC); in xfs_attr_node_addname() 1254 retval = xfs_attr3_leaf_add(blk->bp, state->args); in xfs_attr_node_addname() 1403 blk = &state->path.blk[ state->path.active-1 ]; in xfs_attr_node_addname() 1404 ASSERT(blk->magic == XFS_ATTR_LEAF_MAGIC); in xfs_attr_node_addname() 1405 error = xfs_attr3_leaf_remove(blk->bp, args); in xfs_attr_node_addname() 1471 xfs_da_state_blk_t *blk; in xfs_attr_node_removename() local 1503 blk = &state->path.blk[ state->path.active-1 ]; in xfs_attr_node_removename() 1504 ASSERT(blk->bp != NULL); in xfs_attr_node_removename() [all …]
|
D | xfs_da_btree.c | 115 state->altpath.blk[i].bp = NULL; in xfs_da_state_kill_altpath() 416 ASSERT(state->path.blk[max].magic == XFS_ATTR_LEAF_MAGIC || in xfs_da3_split() 417 state->path.blk[max].magic == XFS_DIR2_LEAFN_MAGIC); in xfs_da3_split() 419 addblk = &state->path.blk[max]; /* initial dummy value */ in xfs_da3_split() 421 oldblk = &state->path.blk[i]; in xfs_da3_split() 422 newblk = &state->altpath.blk[i]; in xfs_da3_split() 493 oldblk = &state->path.blk[0]; in xfs_da3_split() 986 drop_blk = &state->path.blk[ state->path.active-1 ]; in xfs_da3_join() 987 save_blk = &state->altpath.blk[ state->path.active-1 ]; in xfs_da3_join() 988 ASSERT(state->path.blk[0].magic == XFS_DA_NODE_MAGIC); in xfs_da3_join() [all …]
|
D | xfs_dir2_node.c | 1421 xfs_da_state_blk_t *blk; /* leaf block */ in xfs_dir2_leafn_toosmall() local 1439 blk = &state->path.blk[state->path.active - 1]; in xfs_dir2_leafn_toosmall() 1440 leaf = blk->bp->b_addr; in xfs_dir2_leafn_toosmall() 1443 xfs_dir3_leaf_check(state->args->dp->i_mount, blk->bp); in xfs_dir2_leafn_toosmall() 1528 if (blkno < blk->blkno) in xfs_dir2_leafn_toosmall() 1610 xfs_da_state_blk_t *blk; /* leaf block for insert */ in xfs_dir2_node_addname() local 1644 blk = &state->path.blk[state->path.active - 1]; in xfs_dir2_node_addname() 1645 ASSERT(blk->magic == XFS_DIR2_LEAFN_MAGIC); in xfs_dir2_node_addname() 1649 rval = xfs_dir2_leafn_add(blk->bp, args, blk->index); in xfs_dir2_node_addname() 2084 xfs_trans_brelse(args->trans, state->path.blk[i].bp); in xfs_dir2_node_lookup() [all …]
|
/fs/gfs2/ |
D | recovery.c | 32 int gfs2_replay_read_block(struct gfs2_jdesc *jd, unsigned int blk, in gfs2_replay_read_block() argument 42 error = gfs2_extent_map(&ip->i_inode, blk, &new, &dblock, &extlen); in gfs2_replay_read_block() 150 static int get_log_header(struct gfs2_jdesc *jd, unsigned int blk, in get_log_header() argument 159 error = gfs2_replay_read_block(jd, blk, &bh); in get_log_header() 170 if (error || lh.lh_blkno != blk || lh.lh_hash != hash) in get_log_header() 191 static int find_good_lh(struct gfs2_jdesc *jd, unsigned int *blk, in find_good_lh() argument 194 unsigned int orig_blk = *blk; in find_good_lh() 198 error = get_log_header(jd, *blk, head); in find_good_lh() 202 if (++*blk == jd->jd_blocks) in find_good_lh() 203 *blk = 0; in find_good_lh() [all …]
|
D | recovery.h | 17 static inline void gfs2_replay_incr_blk(struct gfs2_sbd *sdp, unsigned int *blk) in gfs2_replay_incr_blk() argument 19 if (++*blk == sdp->sd_jdesc->jd_blocks) in gfs2_replay_incr_blk() 20 *blk = 0; in gfs2_replay_incr_blk() 23 extern int gfs2_replay_read_block(struct gfs2_jdesc *jd, unsigned int blk,
|
D | dir.c | 1854 u64 blk, nblk; in leaf_dealloc() local 1879 for (blk = leaf_no; blk; blk = nblk) { in leaf_dealloc() 1880 if (blk != leaf_no) { in leaf_dealloc() 1881 error = get_leaf(dip, blk, &bh); in leaf_dealloc() 1887 if (blk != leaf_no) in leaf_dealloc() 1890 gfs2_rlist_add(dip, &rlist, blk); in leaf_dealloc() 1914 for (blk = leaf_no; blk; blk = nblk) { in leaf_dealloc() 1915 if (blk != leaf_no) { in leaf_dealloc() 1916 error = get_leaf(dip, blk, &bh); in leaf_dealloc() 1922 if (blk != leaf_no) in leaf_dealloc() [all …]
|
D | rgrp.c | 177 static inline int rs_cmp(u64 blk, u32 len, struct gfs2_blkreserv *rs) in rs_cmp() argument 181 if (blk >= startblk + rs->rs_free) in rs_cmp() 183 if (blk + len - 1 < startblk) in rs_cmp() 470 struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk, bool exact) in gfs2_blk2rgrpd() argument 480 if (blk < cur->rd_addr) in gfs2_blk2rgrpd() 482 else if (blk >= cur->rd_data0 + cur->rd_data) in gfs2_blk2rgrpd() 487 if (blk < cur->rd_addr) in gfs2_blk2rgrpd() 489 if (blk >= cur->rd_data0 + cur->rd_data) in gfs2_blk2rgrpd() 1186 u64 blk; in gfs2_rgrp_send_discards() local 1207 blk = offset + ((bi->bi_start + x) * GFS2_NBBY); in gfs2_rgrp_send_discards() [all …]
|
/fs/adfs/ |
D | dir_f.c | 147 int blk = 0; in adfs_dir_read() local 161 for (blk = 0; blk < size; blk++) { in adfs_dir_read() 164 phys = __adfs_block_map(sb, object_id, blk); in adfs_dir_read() 167 object_id, blk); in adfs_dir_read() 171 dir->bh[blk] = sb_bread(sb, phys); in adfs_dir_read() 172 if (!dir->bh[blk]) in adfs_dir_read() 190 dir->nr_buffers = blk; in adfs_dir_read() 198 for (blk -= 1; blk >= 0; blk -= 1) in adfs_dir_read() 199 brelse(dir->bh[blk]); in adfs_dir_read()
|
D | dir_fplus.c | 21 unsigned int blk, size; in adfs_fplus_read() local 73 for (blk = 1; blk < size; blk++) { in adfs_fplus_read() 74 block = __adfs_block_map(sb, id, blk); in adfs_fplus_read() 76 adfs_error(sb, "dir object %X has a hole at offset %d", id, blk); in adfs_fplus_read() 80 dir->bh_fplus[blk] = sb_bread(sb, block); in adfs_fplus_read() 81 if (!dir->bh_fplus[blk]) { in adfs_fplus_read() 84 id, blk, block); in adfs_fplus_read()
|
/fs/ext4/ |
D | balloc.c | 323 ext4_fsblk_t blk; in ext4_valid_block_bitmap() local 338 blk = ext4_block_bitmap(sb, desc); in ext4_valid_block_bitmap() 339 offset = blk - group_first_block; in ext4_valid_block_bitmap() 342 return blk; in ext4_valid_block_bitmap() 345 blk = ext4_inode_bitmap(sb, desc); in ext4_valid_block_bitmap() 346 offset = blk - group_first_block; in ext4_valid_block_bitmap() 349 return blk; in ext4_valid_block_bitmap() 352 blk = ext4_inode_table(sb, desc); in ext4_valid_block_bitmap() 353 offset = blk - group_first_block; in ext4_valid_block_bitmap() 360 return blk; in ext4_valid_block_bitmap() [all …]
|
D | block_validity.c | 228 unsigned int blk; in ext4_check_blockref() local 231 blk = le32_to_cpu(*bref++); in ext4_check_blockref() 232 if (blk && in ext4_check_blockref() 234 blk, 1))) { in ext4_check_blockref() 235 es->s_last_error_block = cpu_to_le64(blk); in ext4_check_blockref() 236 ext4_error_inode(inode, function, line, blk, in ext4_check_blockref()
|
D | resize.c | 343 ext4_fsblk_t blk) in bclean() argument 348 bh = sb_getblk(sb, blk); in bclean() 702 const ext4_fsblk_t blk = primary->b_blocknr; in verify_reserved_gdb() local 712 grp * EXT4_BLOCKS_PER_GROUP(sb) + blk){ in verify_reserved_gdb() 715 blk, grp, in verify_reserved_gdb() 718 blk); in verify_reserved_gdb() 941 ext4_fsblk_t blk; in reserve_backup_gdb() local 958 blk = EXT4_SB(sb)->s_sbh->b_blocknr + 1 + EXT4_SB(sb)->s_gdb_count; in reserve_backup_gdb() 964 for (res = 0; res < reserved_gdb; res++, blk++) { in reserve_backup_gdb() 965 if (le32_to_cpu(*data) != blk) { in reserve_backup_gdb() [all …]
|
D | ext4.h | 265 #define EXT4_B2C(sbi, blk) ((blk) >> (sbi)->s_cluster_bits) argument 2498 struct ext4_group_desc *bg, ext4_fsblk_t blk); 2500 struct ext4_group_desc *bg, ext4_fsblk_t blk); 2502 struct ext4_group_desc *bg, ext4_fsblk_t blk); 2553 ext4_fsblk_t blk) in ext4_blocks_count_set() argument 2555 es->s_blocks_count_lo = cpu_to_le32((u32)blk); in ext4_blocks_count_set() 2556 es->s_blocks_count_hi = cpu_to_le32(blk >> 32); in ext4_blocks_count_set() 2560 ext4_fsblk_t blk) in ext4_free_blocks_count_set() argument 2562 es->s_free_blocks_count_lo = cpu_to_le32((u32)blk); in ext4_free_blocks_count_set() 2563 es->s_free_blocks_count_hi = cpu_to_le32(blk >> 32); in ext4_free_blocks_count_set() [all …]
|
D | migrate.c | 623 ext4_fsblk_t blk; in ext4_ind_migrate() local 653 blk = len = 0; in ext4_ind_migrate() 656 blk = ext4_ext_pblock(ex); in ext4_ind_migrate() 666 ei->i_data[i] = cpu_to_le32(blk++); in ext4_ind_migrate()
|
/fs/ext3/ |
D | resize.c | 113 ext3_fsblk_t blk) in bclean() argument 118 bh = sb_getblk(sb, blk); in bclean() 389 const ext3_fsblk_t blk = primary->b_blocknr; in verify_reserved_gdb() local 399 if (le32_to_cpu(*p++) != grp * EXT3_BLOCKS_PER_GROUP(sb) + blk){ in verify_reserved_gdb() 403 blk, grp, in verify_reserved_gdb() 404 grp * EXT3_BLOCKS_PER_GROUP(sb) + blk); in verify_reserved_gdb() 587 ext3_fsblk_t blk; in reserve_backup_gdb() local 604 blk = EXT3_SB(sb)->s_sbh->b_blocknr + 1 + EXT3_SB(sb)->s_gdb_count; in reserve_backup_gdb() 610 for (res = 0; res < reserved_gdb; res++, blk++) { in reserve_backup_gdb() 611 if (le32_to_cpu(*data) != blk) { in reserve_backup_gdb() [all …]
|
D | dir.c | 123 unsigned long blk = filp->f_pos >> EXT3_BLOCK_SIZE_BITS(sb); in ext3_readdir() local 128 err = ext3_get_blocks_handle(NULL, inode, blk, 1, &map_bh, 0); in ext3_readdir() 138 bh = ext3_bread(NULL, inode, blk, 0, &err); in ext3_readdir()
|
/fs/squashfs/ |
D | namei.c | 213 unsigned int blk, off, ino_num; in squashfs_lookup() local 215 blk = le32_to_cpu(dirh.start_block); in squashfs_lookup() 219 ino = SQUASHFS_MKINODE(blk, off); in squashfs_lookup() 223 blk, off, ino_num); in squashfs_lookup()
|
D | export.c | 55 int blk = SQUASHFS_LOOKUP_BLOCK(ino_num - 1); in squashfs_inode_lookup() local 57 u64 start = le64_to_cpu(msblk->inode_lookup_table[blk]); in squashfs_inode_lookup()
|
/fs/ufs/ |
D | util.h | 342 u64 blk) in ubh_get_data_ptr() argument 345 return ubh_get_addr64(ubh, blk); in ubh_get_data_ptr() 347 return ubh_get_addr32(ubh, blk); in ubh_get_data_ptr() 553 unsigned blk) in ufs_get_direct_data_ptr() argument 555 BUG_ON(blk > UFS_TIND_BLOCK); in ufs_get_direct_data_ptr() 557 (void *)&ufsi->i_u1.u2_i_data[blk] : in ufs_get_direct_data_ptr() 558 (void *)&ufsi->i_u1.i_data[blk]; in ufs_get_direct_data_ptr()
|
/fs/jfs/ |
D | super.c | 728 sector_t blk = off >> sb->s_blocksize_bits; in jfs_quota_read() local 748 err = jfs_get_block(inode, blk, &tmp_bh, 0); in jfs_quota_read() 763 blk++; in jfs_quota_read() 773 sector_t blk = off >> sb->s_blocksize_bits; in jfs_quota_write() local 788 err = jfs_get_block(inode, blk, &tmp_bh, 1); in jfs_quota_write() 809 blk++; in jfs_quota_write()
|
/fs/ubifs/ |
D | journal.c | 1152 unsigned int blk; in ubifs_jnl_truncate() local 1177 blk = new_size >> UBIFS_BLOCK_SHIFT; in ubifs_jnl_truncate() 1178 data_key_init(c, &key, inum, blk); in ubifs_jnl_truncate() 1241 blk = (new_size >> UBIFS_BLOCK_SHIFT) + (bit ? 1 : 0); in ubifs_jnl_truncate() 1242 data_key_init(c, &key, inum, blk); in ubifs_jnl_truncate() 1245 blk = (old_size >> UBIFS_BLOCK_SHIFT) - (bit ? 0 : 1); in ubifs_jnl_truncate() 1246 data_key_init(c, &to_key, inum, blk); in ubifs_jnl_truncate()
|
/fs/ocfs2/ |
D | quota_global.c | 171 sector_t blk = off >> sb->s_blocksize_bits; in ocfs2_quota_read() local 185 err = ocfs2_extent_map_get_blocks(gqinode, blk, &pblock, in ocfs2_quota_read() 206 blk++; in ocfs2_quota_read() 220 sector_t blk = off >> sb->s_blocksize_bits; in ocfs2_quota_write() local 249 err = ocfs2_extent_map_get_blocks(gqinode, blk, &pblock, &pcount, NULL); in ocfs2_quota_write()
|