Home
last modified time | relevance | path

Searched refs:blocks (Results 1 – 25 of 120) sorted by relevance

12345

/fs/incfs/
Dintegrity.c127 int blocks = data_block_count; in incfs_alloc_mtree() local
148 for (lvl = 0; blocks > 1; lvl++) { in incfs_alloc_mtree()
154 blocks = (blocks + hash_per_block - 1) / hash_per_block; in incfs_alloc_mtree()
155 blocks_in_level[lvl] = blocks; in incfs_alloc_mtree()
156 total_blocks += blocks; in incfs_alloc_mtree()
163 blocks = 0; in incfs_alloc_mtree()
168 blocks += blocks_in_level[lvl]; in incfs_alloc_mtree()
169 suboffset = (total_blocks - blocks) in incfs_alloc_mtree()
/fs/verity/
Dopen.c36 u64 blocks; in fsverity_init_merkle_tree_params() local
92 blocks = (inode->i_size + params->block_size - 1) >> log_blocksize; in fsverity_init_merkle_tree_params()
93 pr_debug("Data is %lld bytes (%llu blocks)\n", inode->i_size, blocks); in fsverity_init_merkle_tree_params()
94 while (blocks > 1) { in fsverity_init_merkle_tree_params()
100 blocks = (blocks + params->hashes_per_block - 1) >> in fsverity_init_merkle_tree_params()
103 params->level_start[params->num_levels++] = blocks; in fsverity_init_merkle_tree_params()
109 blocks = params->level_start[level]; in fsverity_init_merkle_tree_params()
112 level, blocks, offset); in fsverity_init_merkle_tree_params()
113 offset += blocks; in fsverity_init_merkle_tree_params()
Denable.c119 u64 blocks; in build_merkle_tree() local
139 blocks = (inode->i_size + params->block_size - 1) >> in build_merkle_tree()
142 err = build_merkle_tree_level(inode, level, blocks, params, in build_merkle_tree()
146 blocks = (blocks + params->hashes_per_block - 1) >> in build_merkle_tree()
/fs/
Dmpage.c203 sector_t blocks[MAX_BUF_PER_PAGE]; in do_mpage_readpage() local
249 blocks[page_block] = map_bh->b_blocknr + map_offset + in do_mpage_readpage()
296 if (page_block && blocks[page_block-1] != map_bh->b_blocknr-1) in do_mpage_readpage()
305 blocks[page_block] = map_bh->b_blocknr+relative_block; in do_mpage_readpage()
332 if (args->bio && (args->last_block_in_bio != blocks[0] - 1)) in do_mpage_readpage()
338 if (!bdev_read_page(bdev, blocks[0] << (blkbits - 9), in do_mpage_readpage()
342 args->bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9), in do_mpage_readpage()
362 args->last_block_in_bio = blocks[blocks_per_page - 1]; in do_mpage_readpage()
544 sector_t blocks[MAX_BUF_PER_PAGE]; in __mpage_writepage() local
583 if (bh->b_blocknr != blocks[page_block-1] + 1) in __mpage_writepage()
[all …]
/fs/xfs/scrub/
Dagheader.c350 xfs_extlen_t *blocks = priv; in xchk_agf_record_bno_lengths() local
352 (*blocks) += rec->ar_blockcount; in xchk_agf_record_bno_lengths()
362 xfs_extlen_t blocks = 0; in xchk_agf_xref_freeblks() local
369 xchk_agf_record_bno_lengths, &blocks); in xchk_agf_xref_freeblks()
372 if (blocks != be32_to_cpu(agf->agf_freeblks)) in xchk_agf_xref_freeblks()
383 xfs_extlen_t blocks; in xchk_agf_xref_cntbt() local
401 error = xfs_alloc_get_rec(sc->sa.cnt_cur, &agbno, &blocks, &have); in xchk_agf_xref_cntbt()
404 if (!have || blocks != be32_to_cpu(agf->agf_longest)) in xchk_agf_xref_cntbt()
415 xfs_agblock_t blocks; in xchk_agf_xref_btreeblks() local
421 error = xfs_btree_count_blocks(sc->sa.rmap_cur, &blocks); in xchk_agf_xref_btreeblks()
[all …]
Dagheader_repair.c244 xfs_agblock_t blocks; in xrep_agf_calc_from_btrees() local
253 error = xfs_btree_count_blocks(cur, &blocks); in xrep_agf_calc_from_btrees()
257 btreeblks = blocks - 1; in xrep_agf_calc_from_btrees()
264 error = xfs_btree_count_blocks(cur, &blocks); in xrep_agf_calc_from_btrees()
268 btreeblks += blocks - 1; in xrep_agf_calc_from_btrees()
272 error = xfs_btree_count_blocks(cur, &blocks); in xrep_agf_calc_from_btrees()
276 agf->agf_rmap_blocks = cpu_to_be32(blocks); in xrep_agf_calc_from_btrees()
277 btreeblks += blocks - 1; in xrep_agf_calc_from_btrees()
285 error = xfs_btree_count_blocks(cur, &blocks); in xrep_agf_calc_from_btrees()
289 agf->agf_refcount_blocks = cpu_to_be32(blocks); in xrep_agf_calc_from_btrees()
Drefcount.c378 xfs_filblks_t blocks; in xchk_refcount_xref_rmap() local
389 &XFS_RMAP_OINFO_REFC, &blocks); in xchk_refcount_xref_rmap()
392 if (blocks != refcbt_blocks) in xchk_refcount_xref_rmap()
397 &XFS_RMAP_OINFO_COW, &blocks); in xchk_refcount_xref_rmap()
400 if (blocks != cow_blocks) in xchk_refcount_xref_rmap()
Dialloc.c516 xfs_filblks_t blocks; in xchk_iallocbt_xref_rmap_btreeblks() local
538 &XFS_RMAP_OINFO_INOBT, &blocks); in xchk_iallocbt_xref_rmap_btreeblks()
541 if (blocks != inobt_blocks + finobt_blocks) in xchk_iallocbt_xref_rmap_btreeblks()
555 xfs_filblks_t blocks; in xchk_iallocbt_xref_rmap_inodes() local
564 &XFS_RMAP_OINFO_INODES, &blocks); in xchk_iallocbt_xref_rmap_inodes()
568 if (blocks != inode_blocks) in xchk_iallocbt_xref_rmap_inodes()
/fs/sysv/
Dballoc.c47 sysv_zone_t *blocks = sbi->s_bcache; in sysv_free_block() local
86 memcpy(get_chunk(sb,bh), blocks, count * sizeof(sysv_zone_t)); in sysv_free_block()
165 sysv_zone_t *blocks; in sysv_count_free_blocks() local
186 blocks = sbi->s_bcache; in sysv_count_free_blocks()
192 while (n && (zone = blocks[--n]) != 0) in sysv_count_free_blocks()
208 blocks = get_chunk(sb, bh); in sysv_count_free_blocks()
Ditree.c433 unsigned blocks, res, direct = DIRECT, i = DEPTH; in sysv_nblocks() local
434 blocks = (size + s->s_blocksize - 1) >> s->s_blocksize_bits; in sysv_nblocks()
435 res = blocks; in sysv_nblocks()
436 while (--i && blocks > direct) { in sysv_nblocks()
437 blocks = ((blocks - direct - 1) >> ptrs_bits) + 1; in sysv_nblocks()
438 res += blocks; in sysv_nblocks()
441 return blocks; in sysv_nblocks()
449 stat->blocks = (s->s_blocksize / 512) * sysv_nblocks(s, stat->size); in sysv_getattr()
/fs/jffs2/
Dbuild.c381 c->blocks = vzalloc(size); in jffs2_do_mount_fs()
384 c->blocks = kzalloc(size, GFP_KERNEL); in jffs2_do_mount_fs()
385 if (!c->blocks) in jffs2_do_mount_fs()
389 INIT_LIST_HEAD(&c->blocks[i].list); in jffs2_do_mount_fs()
390 c->blocks[i].offset = i * c->sector_size; in jffs2_do_mount_fs()
391 c->blocks[i].free_size = c->sector_size; in jffs2_do_mount_fs()
426 kvfree(c->blocks); in jffs2_do_mount_fs()
/fs/minix/
Ditree_common.c354 unsigned blocks, res, direct = DIRECT, i = DEPTH; in nblocks() local
355 blocks = (size + sb->s_blocksize - 1) >> (BLOCK_SIZE_BITS + k); in nblocks()
356 res = blocks; in nblocks()
357 while (--i && blocks > direct) { in nblocks()
358 blocks -= direct; in nblocks()
359 blocks += sb->s_blocksize/sizeof(block_t) - 1; in nblocks()
360 blocks /= sb->s_blocksize/sizeof(block_t); in nblocks()
361 res += blocks; in nblocks()
/fs/ocfs2/
Docfs2.h727 u64 blocks) in ocfs2_clusters_for_blocks() argument
732 blocks += (1 << b_to_c_bits) - 1; in ocfs2_clusters_for_blocks()
733 return (u32)(blocks >> b_to_c_bits); in ocfs2_clusters_for_blocks()
737 u64 blocks) in ocfs2_blocks_to_clusters() argument
742 return (u32)(blocks >> b_to_c_bits); in ocfs2_blocks_to_clusters()
782 u64 blocks) in ocfs2_block_to_cluster_start() argument
787 clusters = ocfs2_blocks_to_clusters(sb, blocks); in ocfs2_block_to_cluster_start()
804 u64 blocks; in ocfs2_align_bytes_to_blocks() local
806 blocks = ocfs2_blocks_for_bytes(sb, bytes); in ocfs2_align_bytes_to_blocks()
807 return blocks << sb->s_blocksize_bits; in ocfs2_align_bytes_to_blocks()
Djournal.h545 int blocks = ocfs2_mknod_credits(sb, 0, 0); in ocfs2_calc_symlink_credits() local
549 blocks += ocfs2_clusters_to_blocks(sb, 1); in ocfs2_calc_symlink_credits()
551 return blocks + ocfs2_quota_trans_credits(sb); in ocfs2_calc_symlink_credits()
557 int blocks; in ocfs2_calc_group_alloc_credits() local
561 blocks = 1 + 1 + 1 + bitmap_blocks; in ocfs2_calc_group_alloc_credits()
562 return blocks; in ocfs2_calc_group_alloc_credits()
Dslot_map.c342 unsigned long long blocks, bytes = 0; in ocfs2_map_slot_buffers() local
350 blocks = ocfs2_blocks_for_bytes(si->si_inode->i_sb, bytes); in ocfs2_map_slot_buffers()
351 BUG_ON(blocks > UINT_MAX); in ocfs2_map_slot_buffers()
352 si->si_blocks = blocks; in ocfs2_map_slot_buffers()
364 BUG_ON((osb->max_slots / si->si_slots_per_block) > blocks); in ocfs2_map_slot_buffers()
/fs/squashfs/
Dfile.c173 int blocks = min_t(int, n, PAGE_SIZE >> 2); in read_indexes() local
176 offset, blocks << 2); in read_indexes()
183 for (i = 0; i < blocks; i++) { in read_indexes()
191 n -= blocks; in read_indexes()
214 static inline int calculate_skip(int blocks) in calculate_skip() argument
216 int skip = blocks / ((SQUASHFS_META_ENTRIES + 1) in calculate_skip()
275 int blocks = skip * SQUASHFS_META_INDEXES; in fill_meta_index() local
276 long long res = read_indexes(inode->i_sb, blocks, in fill_meta_index()
/fs/ext4/
Dreadpage.c266 sector_t blocks[MAX_BUF_PER_PAGE]; in ext4_mpage_readpages() local
321 blocks[page_block] = map.m_pblk + map_offset + in ext4_mpage_readpages()
358 if (page_block && blocks[page_block-1] != map.m_pblk-1) in ext4_mpage_readpages()
367 blocks[page_block] = map.m_pblk+relative_block; in ext4_mpage_readpages()
396 if (bio && (last_block_in_bio != blocks[0] - 1 || in ext4_mpage_readpages()
418 bio->bi_iter.bi_sector = blocks[0] << (blkbits - 9); in ext4_mpage_readpages()
435 last_block_in_bio = blocks[blocks_per_page - 1]; in ext4_mpage_readpages()
Dext4_jbd2.h264 int type, int blocks, int rsv_blocks);
304 #define ext4_journal_start_with_reserve(inode, type, blocks, rsv_blocks) \ argument
305 __ext4_journal_start((inode), __LINE__, (type), (blocks), (rsv_blocks))
309 int blocks, int rsv_blocks) in __ext4_journal_start() argument
311 return __ext4_journal_start_sb(inode->i_sb, line, type, blocks, in __ext4_journal_start()
/fs/quota/
Dquota_v1.c27 static inline qsize_t v1_qbtos(qsize_t blocks) in v1_qbtos() argument
29 return blocks << QUOTABLOCK_BITS; in v1_qbtos()
130 ulong blocks; in v1_check_quota_file() local
140 blocks = isize >> BLOCK_SIZE_BITS; in v1_check_quota_file()
142 if ((blocks % sizeof(struct v1_disk_dqblk) * BLOCK_SIZE + off) % in v1_check_quota_file()
Dquota.c175 static inline qsize_t qbtos(qsize_t blocks) in qbtos() argument
177 return blocks << QIF_DQBLKSIZE_BITS; in qbtos()
362 fqs->qs_uquota.qfs_nblks = state.s_state[USRQUOTA].blocks; in quota_getstate()
367 fqs->qs_gquota.qfs_nblks = state.s_state[GRPQUOTA].blocks; in quota_getstate()
379 state.s_state[PRJQUOTA].blocks; in quota_getstate()
428 fqs->qs_uquota.qfs_nblks = state.s_state[USRQUOTA].blocks; in quota_getstatev()
433 fqs->qs_gquota.qfs_nblks = state.s_state[GRPQUOTA].blocks; in quota_getstatev()
438 fqs->qs_pquota.qfs_nblks = state.s_state[PRJQUOTA].blocks; in quota_getstatev()
476 static inline u64 quota_bbtob(u64 blocks) in quota_bbtob() argument
478 return blocks << XFS_BB_SHIFT; in quota_bbtob()
/fs/reiserfs/
Dxattr_security.c49 int blocks = 0; in reiserfs_security_init() local
71 blocks = reiserfs_xattr_jcreate_nblocks(inode) + in reiserfs_security_init()
77 return blocks; in reiserfs_security_init()
/fs/gfs2/
Dtrans.c28 int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks, in gfs2_trans_begin() argument
35 BUG_ON(blocks == 0 && revokes == 0); in gfs2_trans_begin()
45 tr->tr_blocks = blocks; in gfs2_trans_begin()
49 if (blocks) in gfs2_trans_begin()
50 tr->tr_reserved += 6 + blocks; in gfs2_trans_begin()
/fs/hfs/
Dextent.c290 u32 total_blocks, blocks, start; in hfs_free_fork() local
306 blocks = 0; in hfs_free_fork()
308 blocks += be16_to_cpu(extent[i].count); in hfs_free_fork()
310 res = hfs_free_extents(sb, extent, blocks, blocks); in hfs_free_fork()
313 if (total_blocks == blocks) in hfs_free_fork()
327 } while (total_blocks > blocks); in hfs_free_fork()
/fs/hfsplus/
Dextents.c401 u32 total_blocks, blocks, start; in hfsplus_free_fork() local
408 blocks = 0; in hfsplus_free_fork()
410 blocks += be32_to_cpu(fork->extents[i].block_count); in hfsplus_free_fork()
412 res = hfsplus_free_extents(sb, fork->extents, blocks, blocks); in hfsplus_free_fork()
415 if (total_blocks == blocks) in hfsplus_free_fork()
434 } while (total_blocks > blocks); in hfsplus_free_fork()
/fs/xfs/
Dxfs_trans.c150 uint blocks, in xfs_trans_reserve() argument
164 if (blocks > 0) { in xfs_trans_reserve()
165 error = xfs_mod_fdblocks(tp->t_mountp, -((int64_t)blocks), rsvd); in xfs_trans_reserve()
170 tp->t_blk_res += blocks; in xfs_trans_reserve()
239 if (blocks > 0) { in xfs_trans_reserve()
240 xfs_mod_fdblocks(tp->t_mountp, (int64_t)blocks, rsvd); in xfs_trans_reserve()
253 uint blocks, in xfs_trans_alloc() argument
286 error = xfs_trans_reserve(tp, resp, blocks, rtextents); in xfs_trans_alloc()

12345