Lines Matching refs:obj_cache
1177 struct obj_cached **obj_cache; member
1875 …struct obj_cached **obj_cache = kalloc_type(struct obj_cached *, CACHE_SIZE, Z_WAITOK | Z_NOFAIL |… in init_cache() local
1879 obj_cache[i] = alloc_init_cache_entry(); in init_cache()
1882 info->obj_cache = obj_cache; in init_cache()
1888 struct obj_cached **obj_cache = info->obj_cache; in check_cache_empty() local
1892 if (obj_cache[i] != NULL) { in check_cache_empty()
1893 T_ASSERT(obj_cache[i]->obj_state == OBJ_STATE_UNUSED, "checked OBJ_STATE_UNUSED"); in check_cache_empty()
1894 T_ASSERT(obj_cache[i]->obj_refcount != NULL, "checked obj_refcount"); in check_cache_empty()
1895 ret = memcmp(obj_cache[i]->obj_buff, "I am groot", OBJ_BUFF_SIZE); in check_cache_empty()
1904 struct obj_cached **obj_cache = info->obj_cache; in free_cache() local
1908 if (obj_cache[i] != NULL) { in free_cache()
1909 kern_apfs_reflock_free(obj_cache[i]->obj_refcount); in free_cache()
1910 obj_cache[i]->obj_refcount = NULL; in free_cache()
1911 kfree_type(struct obj_cached, 1, obj_cache[i]); in free_cache()
1912 obj_cache[i] = NULL; in free_cache()
1916 kfree_type(struct obj_cached *, CACHE_SIZE, obj_cache); in free_cache()
1917 info->obj_cache = NULL; in free_cache()
1923 struct obj_cached **obj_cache = info->obj_cache; in find_id_in_cache() local
1926 if (obj_cache[i] != NULL && obj_cache[i]->obj_id == obj_id) { in find_id_in_cache()
1927 return obj_cache[i]; in find_id_in_cache()
1936 struct obj_cached **obj_cache = info->obj_cache; in free_id_in_cache() local
1939 if (obj_cache[i] != NULL && obj_cache[i]->obj_id == obj_id) { in free_id_in_cache()
1940 assert(obj_cache[i] == expected); in free_id_in_cache()
1941 kfree_type(struct obj_cached, 1, obj_cache[i]); in free_id_in_cache()
1942 obj_cache[i] = NULL; in free_id_in_cache()
1952 struct obj_cached **obj_cache = info->obj_cache; in find_empty_spot_in_cache() local
1955 if (obj_cache[i] == NULL) { in find_empty_spot_in_cache()
1956 obj_cache[i] = alloc_init_cache_entry(); in find_empty_spot_in_cache()
1957 return obj_cache[i]; in find_empty_spot_in_cache()
1959 if (obj_cache[i]->obj_state == OBJ_STATE_UNUSED) { in find_empty_spot_in_cache()
1960 return obj_cache[i]; in find_empty_spot_in_cache()