• Home
  • Raw
  • Download

Lines Matching refs:nat_block

1434 	struct f2fs_nat_block *nat_block;  in f2fs_late_init_nid_bitmap()  local
1441 nat_block = malloc(F2FS_BLKSIZE); in f2fs_late_init_nid_bitmap()
1442 if (!nat_block) { in f2fs_late_init_nid_bitmap()
1454 ret = dev_read_block(nat_block, start_blk); in f2fs_late_init_nid_bitmap()
1458 if (nat_block->entries[nid % NAT_ENTRY_PER_BLOCK].block_addr) in f2fs_late_init_nid_bitmap()
1462 free(nat_block); in f2fs_late_init_nid_bitmap()
1494 struct f2fs_nat_block *nat_block; in write_nat_bits() local
1502 nat_block = malloc(F2FS_BLKSIZE); in write_nat_bits()
1503 ASSERT(nat_block); in write_nat_bits()
1527 ret = dev_read_block(nat_block, blkaddr); in write_nat_bits()
1532 nat_block->entries[j].block_addr != NULL_ADDR) in write_nat_bits()
1541 free(nat_block); in write_nat_bits()
2192 struct f2fs_nat_block *nat_block; in get_nat_entry() local
2200 nat_block = (struct f2fs_nat_block *)calloc(BLOCK_SZ, 1); in get_nat_entry()
2201 ASSERT(nat_block); in get_nat_entry()
2206 ret = dev_read_block(nat_block, block_addr); in get_nat_entry()
2209 memcpy(raw_nat, &nat_block->entries[entry_off], in get_nat_entry()
2211 free(nat_block); in get_nat_entry()
2269 struct f2fs_nat_block *nat_block; in update_nat_blkaddr() local
2274 nat_block = (struct f2fs_nat_block *)calloc(BLOCK_SZ, 1); in update_nat_blkaddr()
2275 ASSERT(nat_block); in update_nat_blkaddr()
2280 ret = dev_read_block(nat_block, block_addr); in update_nat_blkaddr()
2284 nat_block->entries[entry_off].ino = cpu_to_le32(ino); in update_nat_blkaddr()
2285 nat_block->entries[entry_off].block_addr = cpu_to_le32(newaddr); in update_nat_blkaddr()
2287 F2FS_FSCK(sbi)->entries[nid] = nat_block->entries[entry_off]; in update_nat_blkaddr()
2289 ret = dev_write_block(nat_block, block_addr); in update_nat_blkaddr()
2291 free(nat_block); in update_nat_blkaddr()
2556 struct f2fs_nat_block *nat_block; in flush_nat_journal_entries() local
2563 nat_block = (struct f2fs_nat_block *)calloc(BLOCK_SZ, 1); in flush_nat_journal_entries()
2564 ASSERT(nat_block); in flush_nat_journal_entries()
2567 free(nat_block); in flush_nat_journal_entries()
2577 ret = dev_read_block(nat_block, block_addr); in flush_nat_journal_entries()
2580 memcpy(&nat_block->entries[entry_off], &nat_in_journal(journal, i), in flush_nat_journal_entries()
2583 ret = dev_write_block(nat_block, block_addr); in flush_nat_journal_entries()
2894 struct f2fs_nat_block *nat_block; in nullify_nat_entry() local
2909 nat_block = (struct f2fs_nat_block *)calloc(BLOCK_SZ, 1); in nullify_nat_entry()
2910 ASSERT(nat_block); in nullify_nat_entry()
2915 ret = dev_read_block(nat_block, block_addr); in nullify_nat_entry()
2920 le32_to_cpu(nat_block->entries[entry_off].block_addr)); in nullify_nat_entry()
2921 nat_block->entries[entry_off].block_addr = cpu_to_le32(0x1); in nullify_nat_entry()
2923 memset(&nat_block->entries[entry_off], 0, in nullify_nat_entry()
2928 ret = dev_write_block(nat_block, block_addr); in nullify_nat_entry()
2930 free(nat_block); in nullify_nat_entry()
3082 struct f2fs_nat_block *nat_block; in build_nat_area_bitmap() local
3091 nat_block = (struct f2fs_nat_block *)calloc(BLOCK_SZ, 1); in build_nat_area_bitmap()
3092 ASSERT(nat_block); in build_nat_area_bitmap()
3117 ret = dev_read_block(nat_block, block_addr); in build_nat_area_bitmap()
3130 if (le32_to_cpu(nat_block->entries[i].block_addr) != 0x1) { in build_nat_area_bitmap()
3132 nid + i, le32_to_cpu(nat_block->entries[i].block_addr)); in build_nat_area_bitmap()
3138 node_info_from_raw_nat(&ni, &nat_block->entries[i]); in build_nat_area_bitmap()
3166 fsck->entries[nid + i] = nat_block->entries[i]; in build_nat_area_bitmap()
3204 free(nat_block); in build_nat_area_bitmap()