Lines Matching refs:check_state

1914 	struct btree_check_state *check_state = info->state;  in bch_btree_check_thread()  local
1915 struct cache_set *c = check_state->c; in bch_btree_check_thread()
1936 spin_lock(&check_state->idx_lock); in bch_btree_check_thread()
1937 cur_idx = check_state->key_idx; in bch_btree_check_thread()
1938 check_state->key_idx++; in bch_btree_check_thread()
1939 spin_unlock(&check_state->idx_lock); in bch_btree_check_thread()
1955 atomic_set(&check_state->enough, 1); in bch_btree_check_thread()
1983 if (atomic_dec_and_test(&check_state->started)) in bch_btree_check_thread()
1984 wake_up(&check_state->wait); in bch_btree_check_thread()
2009 struct btree_check_state *check_state; in bch_btree_check() local
2021 check_state = kzalloc(sizeof(struct btree_check_state), GFP_KERNEL); in bch_btree_check()
2022 if (!check_state) in bch_btree_check()
2025 check_state->c = c; in bch_btree_check()
2026 check_state->total_threads = bch_btree_chkthread_nr(); in bch_btree_check()
2027 check_state->key_idx = 0; in bch_btree_check()
2028 spin_lock_init(&check_state->idx_lock); in bch_btree_check()
2029 atomic_set(&check_state->started, 0); in bch_btree_check()
2030 atomic_set(&check_state->enough, 0); in bch_btree_check()
2031 init_waitqueue_head(&check_state->wait); in bch_btree_check()
2039 for (i = 0; i < check_state->total_threads; i++) { in bch_btree_check()
2042 if (atomic_read(&check_state->enough)) in bch_btree_check()
2045 check_state->infos[i].result = 0; in bch_btree_check()
2046 check_state->infos[i].state = check_state; in bch_btree_check()
2048 atomic_inc(&check_state->started); in bch_btree_check()
2050 check_state->infos[i].thread = in bch_btree_check()
2052 &check_state->infos[i], in bch_btree_check()
2054 if (IS_ERR(check_state->infos[i].thread)) { in bch_btree_check()
2057 kthread_stop(check_state->infos[i].thread); in bch_btree_check()
2063 wait_event_interruptible(check_state->wait, in bch_btree_check()
2064 atomic_read(&check_state->started) == 0 || in bch_btree_check()
2067 for (i = 0; i < check_state->total_threads; i++) { in bch_btree_check()
2068 if (check_state->infos[i].result) { in bch_btree_check()
2069 ret = check_state->infos[i].result; in bch_btree_check()
2075 kfree(check_state); in bch_btree_check()