Lines Matching refs:icache
58 * This routine flushes the icache, if it exists.
64 if (!fs->icache)
67 for (i=0; i < fs->icache->cache_size; i++)
68 fs->icache->cache[i].ino = 0;
70 fs->icache->buffer_blk = 0;
78 if (fs->icache)
80 retval = ext2fs_get_mem(sizeof(struct ext2_inode_cache), &fs->icache);
84 memset(fs->icache, 0, sizeof(struct ext2_inode_cache));
85 retval = ext2fs_get_mem(fs->blocksize, &fs->icache->buffer);
87 ext2fs_free_mem(&fs->icache);
90 fs->icache->buffer_blk = 0;
91 fs->icache->cache_last = -1;
92 fs->icache->cache_size = 4;
93 fs->icache->refcount = 1;
94 retval = ext2fs_get_array(fs->icache->cache_size,
96 &fs->icache->cache);
98 ext2fs_free_mem(&fs->icache->buffer);
99 ext2fs_free_mem(&fs->icache);
542 if (!fs->icache) {
550 for (i=0; i < fs->icache->cache_size; i++) {
551 if (fs->icache->cache[i].ino == ino) {
552 *inode = fs->icache->cache[i].inode;
589 if (block_nr != fs->icache->buffer_blk) {
591 fs->icache->buffer);
594 fs->icache->buffer_blk = block_nr;
597 memcpy(ptr, ((char *) fs->icache->buffer) + (unsigned) offset,
613 fs->icache->cache_last = (fs->icache->cache_last + 1) %
614 fs->icache->cache_size;
615 fs->icache->cache[fs->icache->cache_last].ino = ino;
616 fs->icache->cache[fs->icache->cache_last].inode = *inode;
647 if (fs->icache) {
648 for (i=0; i < fs->icache->cache_size; i++) {
649 if (fs->icache->cache[i].ino == ino) {
650 fs->icache->cache[i].inode = *inode;
709 if (fs->icache->buffer_blk != block_nr) {
711 fs->icache->buffer);
714 fs->icache->buffer_blk = block_nr;
718 memcpy((char *) fs->icache->buffer + (unsigned) offset,
722 fs->icache->buffer);