Lines Matching refs:kvp_file_info

130 static struct kvp_file_state kvp_file_info[KVP_POOL_COUNT];  variable
137 if (fcntl(kvp_file_info[pool].fd, F_SETLKW, &fl) == -1) { in kvp_acquire_lock()
149 if (fcntl(kvp_file_info[pool].fd, F_SETLK, &fl) == -1) { in kvp_release_lock()
166 filep = fopen(kvp_file_info[pool].fname, "we"); in kvp_update_file()
174 fwrite(kvp_file_info[pool].records, sizeof(struct kvp_record), in kvp_update_file()
175 kvp_file_info[pool].num_records, filep); in kvp_update_file()
190 struct kvp_record *record = kvp_file_info[pool].records; in kvp_update_mem_state()
192 int num_blocks = kvp_file_info[pool].num_blocks; in kvp_update_mem_state()
197 filep = fopen(kvp_file_info[pool].fname, "re"); in kvp_update_mem_state()
235 kvp_file_info[pool].num_blocks = num_blocks; in kvp_update_mem_state()
236 kvp_file_info[pool].records = record; in kvp_update_mem_state()
237 kvp_file_info[pool].num_records = records_read; in kvp_update_mem_state()
259 fname = kvp_file_info[i].fname; in kvp_file_init()
266 kvp_file_info[i].fd = fd; in kvp_file_init()
267 kvp_file_info[i].num_blocks = 1; in kvp_file_init()
268 kvp_file_info[i].records = malloc(alloc_unit); in kvp_file_init()
269 if (kvp_file_info[i].records == NULL) in kvp_file_init()
271 kvp_file_info[i].num_records = 0; in kvp_file_init()
290 num_records = kvp_file_info[pool].num_records; in kvp_key_delete()
291 record = kvp_file_info[pool].records; in kvp_key_delete()
301 kvp_file_info[pool].num_records--; in kvp_key_delete()
314 kvp_file_info[pool].num_records--; in kvp_key_delete()
338 num_records = kvp_file_info[pool].num_records; in kvp_key_add_or_modify()
339 record = kvp_file_info[pool].records; in kvp_key_add_or_modify()
340 num_blocks = kvp_file_info[pool].num_blocks; in kvp_key_add_or_modify()
364 kvp_file_info[pool].num_blocks++; in kvp_key_add_or_modify()
369 kvp_file_info[pool].records = record; in kvp_key_add_or_modify()
370 kvp_file_info[pool].num_records++; in kvp_key_add_or_modify()
391 num_records = kvp_file_info[pool].num_records; in kvp_get_value()
392 record = kvp_file_info[pool].records; in kvp_get_value()
416 record = kvp_file_info[pool].records; in kvp_pool_enumerate()
418 if (index >= kvp_file_info[pool].num_records) { in kvp_pool_enumerate()