Home
last modified time | relevance | path

Searched refs:block_bytes (Results 1 – 25 of 26) sorted by relevance

12

/linux/drivers/md/bcache/
H A Dbset.h265 #define __set_blocks(i, k, block_bytes) \ argument
266 DIV_ROUND_UP(__set_bytes(i, k), block_bytes)
267 #define set_blocks(i, block_bytes) \ argument
268 __set_blocks(i, (i)->keys, block_bytes)
286 unsigned int block_bytes) in bset_next_set() argument
290 return ((void *) i) + roundup(set_bytes(i), block_bytes); in bset_next_set()
H A Ddebug.c28 i = (void *) i + set_blocks(i, block_bytes(b->c->cache)) * \
29 block_bytes(b->c->cache))
85 block_bytes(b->c->cache); in bch_btree_verify()
92 ((void *) i - (void *) ondisk) / block_bytes(b->c->cache)); in bch_btree_verify()
H A Djournal.c99 blocks = set_blocks(j, block_bytes(ca)); in journal_read_bucket()
163 j = ((void *) j) + blocks * block_bytes(ca); in journal_read_bucket()
755 unsigned int i, sectors = set_blocks(w->data, block_bytes(ca)) *
775 c->journal.blocks_free -= set_blocks(w->data, block_bytes(ca));
867 block_bytes(ca)) * ca->sb.block_size; in journal_wait_for_write()
H A Dbtree.c109 return ((void *) btree_bset_first(b)) + b->written * block_bytes(b->c->cache); in write_block()
178 if (b->written + set_blocks(i, block_bytes(b->c->cache)) > in bch_btree_node_read_done()
204 b->written += set_blocks(i, block_bytes(b->c->cache)); in bch_btree_node_read_done()
210 i = ((void *) i) + block_bytes(b->c->cache)) in bch_btree_node_read_done()
352 b->bio->bi_iter.bi_size = roundup(set_bytes(i), block_bytes(b->c->cache)); in do_btree_node_write()
428 atomic_long_add(set_blocks(i, block_bytes(b->c->cache)) * b->c->cache->sb.block_size, in __bch_btree_node_write()
431 b->written += set_blocks(i, block_bytes(b->c->cache)); in __bch_btree_node_write()
1387 block_bytes(b->c->cache)) > blocks * (nodes - 1)) in btree_gc_coalesce()
1421 block_bytes(b->c->cache)) > blocks) in btree_gc_coalesce()
1437 block_bytes(b->c->cache)) > in btree_gc_coalesce()
[all …]
H A Dsysfs.c734 sysfs_hprint(block_size, block_bytes(c->cache)); in SHOW()
1039 sysfs_hprint(block_size, block_bytes(ca)); in SHOW()
H A Dbcache.h769 #define block_bytes(ca) ((ca)->sb.block_size << 9) macro
H A Dsuper.c1532 if (bcache_device_init(d, block_bytes(c->cache), u->sectors, in flash_dev_run()
/linux/fs/bcachefs/
H A Dfs-io.c294 for (i = round_up(start_offset, block_bytes(c)) >> 9; in __bch2_truncate_folio()
295 i < round_down(end_offset, block_bytes(c)) >> 9; in __bch2_truncate_folio()
503 u64 block_start = round_up(offset, block_bytes(c)); in bchfs_fpunch()
504 u64 block_end = round_down(end, block_bytes(c)); in bchfs_fpunch()
547 if ((offset | len) & (block_bytes(c) - 1)) in bchfs_fcollapse_finsert()
709 u64 block_start = round_down(offset, block_bytes(c)); in bchfs_fallocate()
710 u64 block_end = round_up(end, block_bytes(c)); in bchfs_fallocate()
729 block_start = round_up(offset, block_bytes(c)); in bchfs_fallocate()
730 block_end = round_down(end, block_bytes(c)); in bchfs_fallocate()
842 if ((pos_src & (block_bytes(c) - 1)) || in bch2_remap_file_range()
[all …]
H A Dfs-io-pagecache.c420 for (i = round_down(offset, block_bytes(c)) >> 9; in __bch2_folio_reservation_get()
421 i < round_up(offset + len, block_bytes(c)) >> 9; in __bch2_folio_reservation_get()
436 for (i = round_down(offset, block_bytes(c)) >> 9; in __bch2_folio_reservation_get()
437 i < round_up(offset + len, block_bytes(c)) >> 9; in __bch2_folio_reservation_get()
445 unsigned reserved_offset = round_down(i << 9, block_bytes(c)); in __bch2_folio_reservation_get()
528 round_up((u64) i_size_read(&inode->v), block_bytes(c))); in bch2_set_folio_dirty()
534 for (i = round_down(offset, block_bytes(c)) >> 9; in bch2_set_folio_dirty()
535 i < round_up(offset + len, block_bytes(c)) >> 9; in bch2_set_folio_dirty()
H A Dcompress.c417 if (*src_len <= block_bytes(c)) { in __bio_compress()
447 *src_len = round_down(*src_len, block_bytes(c)); in __bio_compress()
456 if (round_up(*dst_len, block_bytes(c)) >= *src_len) in __bio_compress()
459 pad = round_up(*dst_len, block_bytes(c)) - *dst_len; in __bio_compress()
470 BUG_ON(*dst_len & (block_bytes(c) - 1)); in __bio_compress()
471 BUG_ON(*src_len & (block_bytes(c) - 1)); in __bio_compress()
H A Dbset.h258 unsigned block_bytes) in bset_next_set() argument
262 EBUG_ON(!is_power_of_2(block_bytes)); in bset_next_set()
264 return ((void *) i) + round_up(vstruct_bytes(i), block_bytes); in bset_next_set()
H A Dfs-io-direct.c90 shorten = iov_iter_count(iter) - round_up(ret, block_bytes(c)); in bch2_direct_IO_read()
484 unaligned = bio->bi_iter.bi_size & (block_bytes(c) - 1); in bch2_dio_write_loop()
613 if (unlikely((req->ki_pos|iter->count) & (block_bytes(c) - 1))) { in bch2_direct_write()
H A Dbtree_update_interior.h286 if (remaining_space > (ssize_t) (block_bytes(c) >> 3)) in want_new_bset()
H A Dfs.c1112 stat->blksize = block_bytes(c); in bch2_getattr()
1125 stat->dio_offset_align = block_bytes(c); in bch2_getattr()
2189 sb->s_blocksize = block_bytes(c); in bch2_fs_get_tree()
2190 sb->s_blocksize_bits = ilog2(block_bytes(c)); in bch2_fs_get_tree()
H A Dfs-io-buffered.c610 round_up(i_size, block_bytes(c)) && in __bch2_writepage()
614 round_up(i_size, block_bytes(c)), in __bch2_writepage()
H A Dio_misc.c260 POS(inum.inum, round_up(new_i_size, block_bytes(c)) >> 9), in __bch2_resume_logged_op_truncate()
H A Dbtree_io.c1177 bne = (void *) bne + block_bytes(c)) in bch2_btree_node_read_done()
2073 bytes = round_up(bytes, block_bytes(c)); in __bch2_btree_node_write()
2109 sectors_to_write = round_up(bytes_to_write, block_bytes(c)) >> 9; in __bch2_btree_node_write()
H A Dbcachefs.h1181 static inline unsigned block_bytes(const struct bch_fs *c) in block_bytes() function
H A Dio_write.c1626 data_len <= min(block_bytes(c) / 2, 1024U)) { in CLOSURE_CALLBACK()
H A Dbtree_update_interior.c978 unsigned sectors = round_up(bytes, block_bytes(c)) >> 9; in bch2_btree_update_add_new_node()
/linux/drivers/media/pci/bt8xx/
H A Dbt878.c125 bt->block_bytes = bt->buf_size >> 4; in bt878_make_risc()
127 bt->line_bytes = bt->block_bytes; in bt878_make_risc()
156 if (!(buf_pos % bt->block_bytes)) in bt878_risc_program()
160 bt->block_bytes) + in bt878_risc_program()
H A Dbt878.h111 u32 block_bytes; member
H A Ddvb-bt8xx.c53 card->bt->block_bytes], in dvb_bt8xx_work()
54 card->bt->block_bytes); in dvb_bt8xx_work()
/linux/fs/ocfs2/cluster/
H A Dheartbeat.c1569 unsigned long block_bytes; in o2hb_region_block_bytes_store() local
1575 status = o2hb_read_block_input(reg, page, &block_bytes, in o2hb_region_block_bytes_store()
1580 reg->hr_block_bytes = (unsigned int)block_bytes; in o2hb_region_block_bytes_store()
1927 CONFIGFS_ATTR(o2hb_region_, block_bytes);
/linux/drivers/gpu/drm/radeon/
H A Dr100.c2125 int block_width, block_height, block_bytes; in r100_track_compress_size() local
2135 block_bytes = 8; in r100_track_compress_size()
2140 block_bytes = 16; in r100_track_compress_size()
2149 sz = wblocks * hblocks * block_bytes; in r100_track_compress_size()

12