Lines Matching refs:blkaddr
247 block_t blkaddr = ctx->fs_blkaddr; in f2fs_handle_step_decompress() local
253 f2fs_end_read_compressed_page(page, false, blkaddr, in f2fs_handle_step_decompress()
258 blkaddr++; in f2fs_handle_step_decompress()
419 int f2fs_target_device_index(struct f2fs_sb_info *sbi, block_t blkaddr) in f2fs_target_device_index() argument
427 if (FDEV(i).start_blk <= blkaddr && FDEV(i).end_blk >= blkaddr) in f2fs_target_device_index()
985 static bool is_end_zone_blkaddr(struct f2fs_sb_info *sbi, block_t blkaddr) in is_end_zone_blkaddr() argument
990 devi = f2fs_target_device_index(sbi, blkaddr); in is_end_zone_blkaddr()
991 if (blkaddr < FDEV(devi).start_blk || in is_end_zone_blkaddr()
992 blkaddr > FDEV(devi).end_blk) { in is_end_zone_blkaddr()
993 f2fs_err(sbi, "Invalid block %x", blkaddr); in is_end_zone_blkaddr()
996 blkaddr -= FDEV(devi).start_blk; in is_end_zone_blkaddr()
999 f2fs_blkz_is_seq(sbi, devi, blkaddr) && in is_end_zone_blkaddr()
1000 (blkaddr % sbi->blocks_per_blkz == sbi->blocks_per_blkz - 1); in is_end_zone_blkaddr()
1105 static struct bio *f2fs_grab_read_bio(struct inode *inode, block_t blkaddr, in f2fs_grab_read_bio() argument
1114 struct block_device *bdev = f2fs_target_device(sbi, blkaddr, §or); in f2fs_grab_read_bio()
1144 ctx->fs_blkaddr = blkaddr; in f2fs_grab_read_bio()
1155 block_t blkaddr, blk_opf_t op_flags, in f2fs_submit_page_read() argument
1161 bio = f2fs_grab_read_bio(inode, blkaddr, 1, op_flags, in f2fs_submit_page_read()
1167 f2fs_wait_on_block_writeback(inode, blkaddr); in f2fs_submit_page_read()
1210 void f2fs_update_data_blkaddr(struct dnode_of_data *dn, block_t blkaddr) in f2fs_update_data_blkaddr() argument
1212 dn->data_blkaddr = blkaddr; in f2fs_update_data_blkaddr()
1237 block_t blkaddr = f2fs_data_blkaddr(dn); in f2fs_reserve_new_blocks() local
1239 if (blkaddr == NULL_ADDR) { in f2fs_reserve_new_blocks()
1606 block_t blkaddr; in f2fs_map_blocks() local
1649 blkaddr = f2fs_data_blkaddr(&dn); in f2fs_map_blocks()
1650 is_hole = !__is_valid_data_blkaddr(blkaddr); in f2fs_map_blocks()
1652 !f2fs_is_valid_blkaddr(sbi, blkaddr, DATA_GENERIC_ENHANCE)) { in f2fs_map_blocks()
1668 if (blkaddr == NULL_ADDR) { in f2fs_map_blocks()
1688 blkaddr = dn.data_blkaddr; in f2fs_map_blocks()
1709 if (blkaddr == NULL_ADDR) { in f2fs_map_blocks()
1727 bidx = f2fs_target_device_index(sbi, blkaddr); in f2fs_map_blocks()
1731 if (blkaddr == NEW_ADDR) in f2fs_map_blocks()
1735 map->m_pblk = blkaddr; in f2fs_map_blocks()
1741 blkaddr == (map->m_pblk + ofs)) || in f2fs_map_blocks()
1742 (map->m_pblk == NEW_ADDR && blkaddr == NEW_ADDR) || in f2fs_map_blocks()
2304 block_t blkaddr; in f2fs_read_multi_pages() local
2306 blkaddr = from_dnode ? data_blkaddr(dn.inode, dn.node_page, in f2fs_read_multi_pages()
2310 if (!__is_valid_data_blkaddr(blkaddr)) in f2fs_read_multi_pages()
2313 if (!f2fs_is_valid_blkaddr(sbi, blkaddr, DATA_GENERIC)) { in f2fs_read_multi_pages()
2337 block_t blkaddr; in f2fs_read_multi_pages() local
2340 blkaddr = from_dnode ? data_blkaddr(dn.inode, dn.node_page, in f2fs_read_multi_pages()
2344 f2fs_wait_on_block_writeback(inode, blkaddr); in f2fs_read_multi_pages()
2346 if (f2fs_load_compressed_page(sbi, page, blkaddr)) { in f2fs_read_multi_pages()
2355 *last_block_in_bio, blkaddr) || in f2fs_read_multi_pages()
2363 bio = f2fs_grab_read_bio(inode, blkaddr, nr_pages, in f2fs_read_multi_pages()
2384 *last_block_in_bio = blkaddr; in f2fs_read_multi_pages()
3623 block_t blkaddr = NULL_ADDR; in f2fs_write_begin() local
3682 &blkaddr, &need_balance, &use_cow); in f2fs_write_begin()
3685 &blkaddr, &need_balance); in f2fs_write_begin()
3712 if (blkaddr == NEW_ADDR) { in f2fs_write_begin()
3716 if (!f2fs_is_valid_blkaddr(sbi, blkaddr, in f2fs_write_begin()
3724 blkaddr, 0, true); in f2fs_write_begin()