• Home
  • Raw
  • Download

Lines Matching refs:icache

69 	if (!fs->icache)  in ext2fs_flush_icache()
72 for (i=0; i < fs->icache->cache_size; i++) in ext2fs_flush_icache()
73 fs->icache->cache[i].ino = 0; in ext2fs_flush_icache()
75 fs->icache->buffer_blk = 0; in ext2fs_flush_icache()
82 void ext2fs_free_inode_cache(struct ext2_inode_cache *icache) in ext2fs_free_inode_cache() argument
86 if (--icache->refcount) in ext2fs_free_inode_cache()
88 if (icache->buffer) in ext2fs_free_inode_cache()
89 ext2fs_free_mem(&icache->buffer); in ext2fs_free_inode_cache()
90 for (i = 0; i < icache->cache_size; i++) in ext2fs_free_inode_cache()
91 ext2fs_free_mem(&icache->cache[i].inode); in ext2fs_free_inode_cache()
92 if (icache->cache) in ext2fs_free_inode_cache()
93 ext2fs_free_mem(&icache->cache); in ext2fs_free_inode_cache()
94 icache->buffer_blk = 0; in ext2fs_free_inode_cache()
95 ext2fs_free_mem(&icache); in ext2fs_free_inode_cache()
103 if (fs->icache) in ext2fs_create_inode_cache()
105 retval = ext2fs_get_mem(sizeof(struct ext2_inode_cache), &fs->icache); in ext2fs_create_inode_cache()
109 memset(fs->icache, 0, sizeof(struct ext2_inode_cache)); in ext2fs_create_inode_cache()
110 retval = ext2fs_get_mem(fs->blocksize, &fs->icache->buffer); in ext2fs_create_inode_cache()
114 fs->icache->buffer_blk = 0; in ext2fs_create_inode_cache()
115 fs->icache->cache_last = -1; in ext2fs_create_inode_cache()
116 fs->icache->cache_size = cache_size; in ext2fs_create_inode_cache()
117 fs->icache->refcount = 1; in ext2fs_create_inode_cache()
118 retval = ext2fs_get_array(fs->icache->cache_size, in ext2fs_create_inode_cache()
120 &fs->icache->cache); in ext2fs_create_inode_cache()
124 for (i = 0; i < fs->icache->cache_size; i++) { in ext2fs_create_inode_cache()
126 &fs->icache->cache[i].inode); in ext2fs_create_inode_cache()
134 ext2fs_free_inode_cache(fs->icache); in ext2fs_create_inode_cache()
135 fs->icache = 0; in ext2fs_create_inode_cache()
758 if (!fs->icache) { in ext2fs_read_inode_full()
764 for (i = 0; i < fs->icache->cache_size; i++) { in ext2fs_read_inode_full()
765 if (fs->icache->cache[i].ino == ino) { in ext2fs_read_inode_full()
766 memcpy(inode, fs->icache->cache[i].inode, in ext2fs_read_inode_full()
793 cache_slot = (fs->icache->cache_last + 1) % fs->icache->cache_size; in ext2fs_read_inode_full()
794 iptr = (struct ext2_inode_large *)fs->icache->cache[cache_slot].inode; in ext2fs_read_inode_full()
802 if (block_nr != fs->icache->buffer_blk) { in ext2fs_read_inode_full()
804 fs->icache->buffer); in ext2fs_read_inode_full()
807 fs->icache->buffer_blk = block_nr; in ext2fs_read_inode_full()
810 memcpy(ptr, ((char *) fs->icache->buffer) + (unsigned) offset, in ext2fs_read_inode_full()
831 fs->icache->cache_last = cache_slot; in ext2fs_read_inode_full()
832 fs->icache->cache[cache_slot].ino = ino; in ext2fs_read_inode_full()
891 if (fs->icache) { in ext2fs_write_inode_full()
892 for (i=0; i < fs->icache->cache_size; i++) { in ext2fs_write_inode_full()
893 if (fs->icache->cache[i].ino == ino) { in ext2fs_write_inode_full()
894 memcpy(fs->icache->cache[i].inode, inode, in ext2fs_write_inode_full()
938 if (fs->icache->buffer_blk != block_nr) { in ext2fs_write_inode_full()
940 fs->icache->buffer); in ext2fs_write_inode_full()
943 fs->icache->buffer_blk = block_nr; in ext2fs_write_inode_full()
947 memcpy((char *) fs->icache->buffer + (unsigned) offset, in ext2fs_write_inode_full()
951 fs->icache->buffer); in ext2fs_write_inode_full()