Lines Matching refs:blkaddr
392 static bool __found_offset(struct address_space *mapping, block_t blkaddr, in __found_offset() argument
397 if (__is_valid_data_blkaddr(blkaddr)) in __found_offset()
399 if (blkaddr == NEW_ADDR && in __found_offset()
404 if (blkaddr == NULL_ADDR) in __found_offset()
461 block_t blkaddr; in f2fs_seek_block() local
463 blkaddr = f2fs_data_blkaddr(&dn); in f2fs_seek_block()
465 if (__is_valid_data_blkaddr(blkaddr) && in f2fs_seek_block()
467 blkaddr, DATA_GENERIC_ENHANCE)) { in f2fs_seek_block()
472 if (__found_offset(file->f_mapping, blkaddr, in f2fs_seek_block()
577 block_t blkaddr = le32_to_cpu(*addr); in f2fs_truncate_data_blocks_range() local
584 compressed_cluster = (blkaddr == COMPRESS_ADDR); in f2fs_truncate_data_blocks_range()
588 if (blkaddr == NULL_ADDR) in f2fs_truncate_data_blocks_range()
594 if (__is_valid_data_blkaddr(blkaddr)) { in f2fs_truncate_data_blocks_range()
595 if (!f2fs_is_valid_blkaddr(sbi, blkaddr, in f2fs_truncate_data_blocks_range()
605 f2fs_invalidate_blocks(sbi, blkaddr); in f2fs_truncate_data_blocks_range()
607 if (!released || blkaddr != COMPRESS_ADDR) in f2fs_truncate_data_blocks_range()
1169 static int __read_out_blkaddrs(struct inode *inode, block_t *blkaddr, in __read_out_blkaddrs() argument
1186 blkaddr += done; in __read_out_blkaddrs()
1193 for (i = 0; i < done; i++, blkaddr++, do_replace++, dn.ofs_in_node++) { in __read_out_blkaddrs()
1194 *blkaddr = f2fs_data_blkaddr(&dn); in __read_out_blkaddrs()
1196 if (__is_valid_data_blkaddr(*blkaddr) && in __read_out_blkaddrs()
1197 !f2fs_is_valid_blkaddr(sbi, *blkaddr, in __read_out_blkaddrs()
1204 if (!f2fs_is_checkpointed_data(sbi, *blkaddr)) { in __read_out_blkaddrs()
1225 static int __roll_back_blkaddrs(struct inode *inode, block_t *blkaddr, in __roll_back_blkaddrs() argument
1232 for (i = 0; i < len; i++, do_replace++, blkaddr++) { in __roll_back_blkaddrs()
1240 f2fs_invalidate_blocks(sbi, *blkaddr); in __roll_back_blkaddrs()
1242 f2fs_update_data_blkaddr(&dn, *blkaddr); in __roll_back_blkaddrs()
1250 block_t *blkaddr, int *do_replace, in __clone_blkaddrs() argument
1258 if (blkaddr[i] == NULL_ADDR && !full) { in __clone_blkaddrs()
1263 if (do_replace[i] || blkaddr[i] == NULL_ADDR) { in __clone_blkaddrs()
1293 blkaddr[i], ni.version, true, false); in __clone_blkaddrs()
1302 } while (--ilen && (do_replace[i] || blkaddr[i] == NULL_ADDR)); in __clone_blkaddrs()
3437 block_t blkaddr; in release_compress_blocks() local
3441 blkaddr = data_blkaddr(dn->inode, dn->node_page, in release_compress_blocks()
3444 if (!__is_valid_data_blkaddr(blkaddr)) in release_compress_blocks()
3446 if (unlikely(!f2fs_is_valid_blkaddr(sbi, blkaddr, in release_compress_blocks()
3457 blkaddr = f2fs_data_blkaddr(dn); in release_compress_blocks()
3460 if (blkaddr == COMPRESS_ADDR) in release_compress_blocks()
3466 if (__is_valid_data_blkaddr(blkaddr)) in release_compress_blocks()
3469 if (blkaddr != NEW_ADDR) in release_compress_blocks()
3603 block_t blkaddr; in reserve_compress_blocks() local
3607 blkaddr = data_blkaddr(dn->inode, dn->node_page, in reserve_compress_blocks()
3610 if (!__is_valid_data_blkaddr(blkaddr)) in reserve_compress_blocks()
3612 if (unlikely(!f2fs_is_valid_blkaddr(sbi, blkaddr, in reserve_compress_blocks()
3625 blkaddr = f2fs_data_blkaddr(dn); in reserve_compress_blocks()
3628 if (blkaddr == COMPRESS_ADDR) in reserve_compress_blocks()
3634 if (__is_valid_data_blkaddr(blkaddr)) { in reserve_compress_blocks()
3879 block_t blkaddr = f2fs_data_blkaddr(&dn); in f2fs_sec_trim_file() local
3881 if (!__is_valid_data_blkaddr(blkaddr)) in f2fs_sec_trim_file()
3884 if (!f2fs_is_valid_blkaddr(sbi, blkaddr, in f2fs_sec_trim_file()
3893 cur_bdev = f2fs_target_device(sbi, blkaddr, NULL); in f2fs_sec_trim_file()
3895 int di = f2fs_target_device_index(sbi, blkaddr); in f2fs_sec_trim_file()
3897 blkaddr -= FDEV(di).start_blk; in f2fs_sec_trim_file()
3903 blkaddr == prev_block + len) { in f2fs_sec_trim_file()
3921 prev_block = blkaddr; in f2fs_sec_trim_file()