Lines Matching refs:bi
88 struct yaffs_block_info *bi) in yaffs2_clear_oldest_dirty_seq() argument
94 if (!bi || bi->seq_number == dev->oldest_dirty_seq) { in yaffs2_clear_oldest_dirty_seq()
106 struct yaffs_block_info *bi) in yaffs2_update_oldest_dirty_seq() argument
112 if (dev->oldest_dirty_seq > bi->seq_number) { in yaffs2_update_oldest_dirty_seq()
113 dev->oldest_dirty_seq = bi->seq_number; in yaffs2_update_oldest_dirty_seq()
119 int yaffs_block_ok_for_gc(struct yaffs_dev *dev, struct yaffs_block_info *bi) in yaffs_block_ok_for_gc() argument
125 if (!bi->has_shrink_hdr) in yaffs_block_ok_for_gc()
133 return (bi->seq_number <= dev->oldest_dirty_seq); in yaffs_block_ok_for_gc()
146 struct yaffs_block_info *bi; in yaffs2_find_refresh_block() local
173 bi = dev->block_info; in yaffs2_find_refresh_block()
176 if (bi->block_state == YAFFS_BLOCK_STATE_FULL) { in yaffs2_find_refresh_block()
178 if (oldest < 1 || bi->seq_number < oldest_seq) { in yaffs2_find_refresh_block()
180 oldest_seq = bi->seq_number; in yaffs2_find_refresh_block()
183 bi++; in yaffs2_find_refresh_block()
934 struct yaffs_block_info *bi, in yaffs2_scan_chunk() argument
957 tags.seq_number = bi->seq_number; in yaffs2_scan_chunk()
987 bi->block_state = YAFFS_BLOCK_STATE_EMPTY; in yaffs2_scan_chunk()
990 if (bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCAN || in yaffs2_scan_chunk()
991 bi->block_state == YAFFS_BLOCK_STATE_ALLOCATING) { in yaffs2_scan_chunk()
992 if (dev->seq_number == bi->seq_number) { in yaffs2_scan_chunk()
998 bi->block_state = in yaffs2_scan_chunk()
1028 tags.seq_number != bi->seq_number) { in yaffs2_scan_chunk()
1043 bi->pages_in_use++; in yaffs2_scan_chunk()
1090 bi->pages_in_use++; in yaffs2_scan_chunk()
1185 bi->has_shrink_hdr = 1; in yaffs2_scan_chunk()
1280 bi->has_shrink_hdr = 1; in yaffs2_scan_chunk()
1349 struct yaffs_block_info *bi; in yaffs2_scan_backwards() local
1386 bi = dev->block_info; in yaffs2_scan_backwards()
1390 bi->pages_in_use = 0; in yaffs2_scan_backwards()
1391 bi->soft_del_pages = 0; in yaffs2_scan_backwards()
1395 bi->block_state = state; in yaffs2_scan_backwards()
1396 bi->seq_number = seq_number; in yaffs2_scan_backwards()
1398 if (bi->seq_number == YAFFS_SEQUENCE_CHECKPOINT_DATA) in yaffs2_scan_backwards()
1399 bi->block_state = YAFFS_BLOCK_STATE_CHECKPOINT; in yaffs2_scan_backwards()
1400 if (bi->seq_number == YAFFS_SEQUENCE_BAD_BLOCK) in yaffs2_scan_backwards()
1401 bi->block_state = YAFFS_BLOCK_STATE_DEAD; in yaffs2_scan_backwards()
1405 blk, bi->block_state, seq_number); in yaffs2_scan_backwards()
1407 if (bi->block_state == YAFFS_BLOCK_STATE_CHECKPOINT) { in yaffs2_scan_backwards()
1410 } else if (bi->block_state == YAFFS_BLOCK_STATE_DEAD) { in yaffs2_scan_backwards()
1413 } else if (bi->block_state == YAFFS_BLOCK_STATE_EMPTY) { in yaffs2_scan_backwards()
1417 } else if (bi->block_state == in yaffs2_scan_backwards()
1434 bi++; in yaffs2_scan_backwards()
1464 bi = yaffs_get_block_info(dev, blk); in yaffs2_scan_backwards()
1477 (bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCAN || in yaffs2_scan_backwards()
1478 bi->block_state == YAFFS_BLOCK_STATE_ALLOCATING); in yaffs2_scan_backwards()
1483 if (yaffs2_scan_chunk(dev, bi, blk, c, in yaffs2_scan_backwards()
1490 if (bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCAN) { in yaffs2_scan_backwards()
1493 bi->block_state = YAFFS_BLOCK_STATE_FULL; in yaffs2_scan_backwards()
1497 if (bi->pages_in_use == 0 && in yaffs2_scan_backwards()
1498 !bi->has_shrink_hdr && in yaffs2_scan_backwards()
1499 bi->block_state == YAFFS_BLOCK_STATE_FULL) { in yaffs2_scan_backwards()