Home
last modified time | relevance | path

Searched refs:nm_i (Results 1 – 4 of 4) sorted by relevance

/external/f2fs-tools/fsck/
Dnode.c21 struct f2fs_nm_info *nm_i = NM_I(sbi); in f2fs_alloc_nid() local
24 for (i = 0; i < nm_i->max_nid; i++) in f2fs_alloc_nid()
25 if(f2fs_test_bit(i, nm_i->nid_bitmap) == 0) in f2fs_alloc_nid()
28 ASSERT(i < nm_i->max_nid); in f2fs_alloc_nid()
29 f2fs_set_bit(i, nm_i->nid_bitmap); in f2fs_alloc_nid()
35 struct f2fs_nm_info *nm_i = NM_I(sbi); in f2fs_release_nid() local
37 ASSERT(nid < nm_i->max_nid); in f2fs_release_nid()
38 ASSERT(f2fs_test_bit(nid, nm_i->nid_bitmap)); in f2fs_release_nid()
40 f2fs_clear_bit(nid, nm_i->nid_bitmap); in f2fs_release_nid()
Dresize.c279 struct f2fs_nm_info *nm_i = NM_I(sbi); in shrink_nats() local
297 for (nid = nm_i->max_nid - 1; nid > new_max_nid; nid -= NAT_ENTRY_PER_BLOCK) { in shrink_nats()
304 if (f2fs_test_bit(block_off, nm_i->nat_bitmap)) in shrink_nats()
316 nm_i->max_nid = new_max_nid; in shrink_nats()
327 struct f2fs_nm_info *nm_i = NM_I(sbi); in migrate_nat() local
340 for (nid = nm_i->max_nid - 1; nid >= 0; nid -= NAT_ENTRY_PER_BLOCK) { in migrate_nat()
348 if (f2fs_test_bit(block_off, nm_i->nat_bitmap)) { in migrate_nat()
350 f2fs_clear_bit(block_off, nm_i->nat_bitmap); in migrate_nat()
375 for (nid = nm_i->max_nid; nid < new_max_nid; in migrate_nat()
Dmount.c1354 struct f2fs_nm_info *nm_i = NM_I(sbi); in current_nat_addr() local
1362 block_addr = (pgoff_t)(nm_i->nat_blkaddr + in current_nat_addr()
1368 if (f2fs_test_bit(block_off, nm_i->nat_bitmap)) { in current_nat_addr()
1380 struct f2fs_nm_info *nm_i = NM_I(sbi); in f2fs_early_init_nid_bitmap() local
1381 int nid_bitmap_size = (nm_i->max_nid + BITS_PER_BYTE - 1) / BITS_PER_BYTE; in f2fs_early_init_nid_bitmap()
1391 nm_i->nid_bitmap = (char *)calloc(nid_bitmap_size, 1); in f2fs_early_init_nid_bitmap()
1392 if (!nm_i->nid_bitmap) in f2fs_early_init_nid_bitmap()
1396 f2fs_set_bit(0, nm_i->nid_bitmap); in f2fs_early_init_nid_bitmap()
1425 f2fs_set_bit(nid, nm_i->nid_bitmap); in f2fs_early_init_nid_bitmap()
1433 struct f2fs_nm_info *nm_i = NM_I(sbi); in f2fs_late_init_nid_bitmap() local
[all …]
Dfsck.c2141 struct f2fs_nm_info *nm_i = NM_I(sbi); in fix_checksum() local
2150 memcpy(bitmap_offset, nm_i->nat_bitmap, nm_i->bitmap_size); in fix_checksum()
2151 memcpy(bitmap_offset + nm_i->bitmap_size, in fix_checksum()