Lines Matching refs:index
232 int index = -1; in ocfs2_buffer_cached() local
243 index = ocfs2_search_cache_array(ci, bh->b_blocknr); in ocfs2_buffer_cached()
249 trace_ocfs2_buffer_cached_end(index, item); in ocfs2_buffer_cached()
251 return (index != -1) || (item != NULL); in ocfs2_buffer_cached()
522 int index) in ocfs2_remove_metadata_array() argument
527 BUG_ON(index < 0 || index >= OCFS2_CACHE_INFO_MAX_ARRAY); in ocfs2_remove_metadata_array()
528 BUG_ON(index >= ci->ci_num_cached); in ocfs2_remove_metadata_array()
533 index, ci->ci_num_cached); in ocfs2_remove_metadata_array()
539 if (ci->ci_num_cached && index < ci->ci_num_cached) { in ocfs2_remove_metadata_array()
540 bytes = sizeof(sector_t) * (ci->ci_num_cached - index); in ocfs2_remove_metadata_array()
541 memmove(&array[index], &array[index + 1], bytes); in ocfs2_remove_metadata_array()
560 int index; in ocfs2_remove_block_from_cache() local
570 index = ocfs2_search_cache_array(ci, block); in ocfs2_remove_block_from_cache()
571 if (index != -1) in ocfs2_remove_block_from_cache()
572 ocfs2_remove_metadata_array(ci, index); in ocfs2_remove_block_from_cache()