Lines Matching full:ri
417 struct nilfs_recovery_info *ri) in nilfs_prepare_segment_for_recovery() argument
419 struct list_head *head = &ri->ri_used_segments; in nilfs_prepare_segment_for_recovery()
428 segnum[2] = ri->ri_segnum; in nilfs_prepare_segment_for_recovery()
429 segnum[3] = ri->ri_nextnum; in nilfs_prepare_segment_for_recovery()
474 nilfs->ns_seg_seq = ri->ri_seq + 2; in nilfs_prepare_segment_for_recovery()
576 * @ri: pointer to a nilfs_recovery_info
581 struct nilfs_recovery_info *ri) in nilfs_do_roll_forward() argument
600 pseg_start = ri->ri_lsegs_start; in nilfs_do_roll_forward()
601 seg_seq = ri->ri_lsegs_start_seq; in nilfs_do_roll_forward()
605 while (segnum != ri->ri_segnum || pseg_start <= ri->ri_pseg_start) { in nilfs_do_roll_forward()
661 if (pseg_start == ri->ri_lsegs_end) in nilfs_do_roll_forward()
669 if (pseg_start == ri->ri_lsegs_end) in nilfs_do_roll_forward()
684 ri->ri_need_recovery = NILFS_RECOVERY_ROLLFORWARD_DONE; in nilfs_do_roll_forward()
701 struct nilfs_recovery_info *ri) in nilfs_finish_roll_forward() argument
706 if (nilfs_get_segnum_of_block(nilfs, ri->ri_lsegs_start) != in nilfs_finish_roll_forward()
707 nilfs_get_segnum_of_block(nilfs, ri->ri_super_root)) in nilfs_finish_roll_forward()
710 bh = __getblk(nilfs->ns_bdev, ri->ri_lsegs_start, nilfs->ns_blocksize); in nilfs_finish_roll_forward()
758 * @ri: pointer to a nilfs_recovery_info struct to store search results.
775 struct nilfs_recovery_info *ri) in nilfs_salvage_orphan_logs() argument
780 if (ri->ri_lsegs_start == 0 || ri->ri_lsegs_end == 0) in nilfs_salvage_orphan_logs()
783 err = nilfs_attach_checkpoint(sb, ri->ri_cno, true, &root); in nilfs_salvage_orphan_logs()
789 err = nilfs_do_roll_forward(nilfs, sb, root, ri); in nilfs_salvage_orphan_logs()
793 if (ri->ri_need_recovery == NILFS_RECOVERY_ROLLFORWARD_DONE) { in nilfs_salvage_orphan_logs()
794 err = nilfs_prepare_segment_for_recovery(nilfs, sb, ri); in nilfs_salvage_orphan_logs()
815 nilfs_finish_roll_forward(nilfs, ri); in nilfs_salvage_orphan_logs()
830 * @ri: pointer to a nilfs_recovery_info struct to store search results.
834 * this search. It fills nilfs_recovery_info (ri) required for recovery.
846 struct nilfs_recovery_info *ri) in nilfs_search_super_root() argument
897 ri->ri_pseg_start = pseg_start; in nilfs_search_super_root()
898 ri->ri_seq = seg_seq; in nilfs_search_super_root()
899 ri->ri_segnum = segnum; in nilfs_search_super_root()
902 ri->ri_nextnum = nextnum; in nilfs_search_super_root()
923 if (!ri->ri_lsegs_start && (flags & NILFS_SS_LOGBGN)) { in nilfs_search_super_root()
924 ri->ri_lsegs_start = pseg_start; in nilfs_search_super_root()
925 ri->ri_lsegs_start_seq = seg_seq; in nilfs_search_super_root()
928 ri->ri_lsegs_end = pseg_start; in nilfs_search_super_root()
933 ri->ri_cno = cno++; in nilfs_search_super_root()
934 ri->ri_super_root = pseg_end; in nilfs_search_super_root()
935 ri->ri_lsegs_start = ri->ri_lsegs_end = 0; in nilfs_search_super_root()
942 nilfs->ns_cno = cno; /* nilfs->ns_cno = ri->ri_cno + 1 */ in nilfs_search_super_root()
947 ri->ri_need_recovery = NILFS_RECOVERY_SR_UPDATED; in nilfs_search_super_root()
988 list_splice_tail(&segments, &ri->ri_used_segments); in nilfs_search_super_root()
991 nilfs->ns_last_cno = ri->ri_cno; in nilfs_search_super_root()