Lines Matching refs:s
7 void bch2_progress_init(struct progress_indicator_state *s, in bch2_progress_init() argument
11 memset(s, 0, sizeof(*s)); in bch2_progress_init()
13 s->next_print = jiffies + HZ * 10; in bch2_progress_init()
24 s->nodes_total += div64_ul(v, btree_sectors(c)); in bch2_progress_init()
28 static inline bool progress_update_p(struct progress_indicator_state *s) in progress_update_p() argument
30 bool ret = time_after_eq(jiffies, s->next_print); in progress_update_p()
33 s->next_print = jiffies + HZ * 10; in progress_update_p()
38 struct progress_indicator_state *s, in bch2_progress_update_iter() argument
45 s->nodes_seen += b != s->last_node; in bch2_progress_update_iter()
46 s->last_node = b; in bch2_progress_update_iter()
48 if (progress_update_p(s)) { in bch2_progress_update_iter()
50 unsigned percent = s->nodes_total in bch2_progress_update_iter()
51 ? div64_u64(s->nodes_seen * 100, s->nodes_total) in bch2_progress_update_iter()
55 msg, percent, s->nodes_seen, s->nodes_total); in bch2_progress_update_iter()