1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _BCACHEFS_RECOVERY_PASSES_TYPES_H 3 #define _BCACHEFS_RECOVERY_PASSES_TYPES_H 4 5 struct bch_fs_recovery { 6 /* 7 * Two different uses: 8 * "Has this fsck pass?" - i.e. should this type of error be an 9 * emergency read-only 10 * And, in certain situations fsck will rewind to an earlier pass: used 11 * for signaling to the toplevel code which pass we want to run now. 12 */ 13 enum bch_recovery_pass curr_pass; 14 enum bch_recovery_pass next_pass; 15 /* never rewinds version of curr_pass */ 16 enum bch_recovery_pass pass_done; 17 u64 passes_to_run; 18 /* bitmask of recovery passes that we actually ran */ 19 u64 passes_complete; 20 u64 passes_failing; 21 u64 passes_ratelimiting; 22 spinlock_t lock; 23 struct semaphore run_lock; 24 struct work_struct work; 25 }; 26 27 #endif /* _BCACHEFS_RECOVERY_PASSES_TYPES_H */ 28