Lines Matching refs:msblk
65 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in locate_meta_index() local
68 mutex_lock(&msblk->meta_index_mutex); in locate_meta_index()
72 if (msblk->meta_index == NULL) in locate_meta_index()
76 if (msblk->meta_index[i].inode_number == inode->i_ino && in locate_meta_index()
77 msblk->meta_index[i].offset >= offset && in locate_meta_index()
78 msblk->meta_index[i].offset <= index && in locate_meta_index()
79 msblk->meta_index[i].locked == 0) { in locate_meta_index()
81 msblk->meta_index[i].offset); in locate_meta_index()
82 meta = &msblk->meta_index[i]; in locate_meta_index()
91 mutex_unlock(&msblk->meta_index_mutex); in locate_meta_index()
103 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in empty_meta_index() local
107 mutex_lock(&msblk->meta_index_mutex); in empty_meta_index()
111 if (msblk->meta_index == NULL) { in empty_meta_index()
118 msblk->meta_index = kcalloc(SQUASHFS_META_SLOTS, in empty_meta_index()
119 sizeof(*(msblk->meta_index)), GFP_KERNEL); in empty_meta_index()
120 if (msblk->meta_index == NULL) { in empty_meta_index()
125 msblk->meta_index[i].inode_number = 0; in empty_meta_index()
126 msblk->meta_index[i].locked = 0; in empty_meta_index()
128 msblk->next_meta_index = 0; in empty_meta_index()
132 msblk->meta_index[msblk->next_meta_index].locked; i--) in empty_meta_index()
133 msblk->next_meta_index = (msblk->next_meta_index + 1) % in empty_meta_index()
142 msblk->next_meta_index, in empty_meta_index()
143 &msblk->meta_index[msblk->next_meta_index]); in empty_meta_index()
145 meta = &msblk->meta_index[msblk->next_meta_index]; in empty_meta_index()
146 msblk->next_meta_index = (msblk->next_meta_index + 1) % in empty_meta_index()
156 mutex_unlock(&msblk->meta_index_mutex); in empty_meta_index()
163 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in release_meta_index() local
164 mutex_lock(&msblk->meta_index_mutex); in release_meta_index()
166 mutex_unlock(&msblk->meta_index_mutex); in release_meta_index()
240 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in fill_meta_index() local
241 int skip = calculate_skip(i_size_read(inode) >> msblk->block_log); in fill_meta_index()
267 msblk->inode_table; in fill_meta_index()
303 msblk->inode_table; in fill_meta_index()
378 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in squashfs_readpage() local
383 int mask = (1 << (msblk->block_log - PAGE_CACHE_SHIFT)) - 1; in squashfs_readpage()
384 int index = page->index >> (msblk->block_log - PAGE_CACHE_SHIFT); in squashfs_readpage()
387 int file_end = i_size_read(inode) >> msblk->block_log; in squashfs_readpage()
409 (i_size_read(inode) & (msblk->block_size - 1)) : in squashfs_readpage()
410 msblk->block_size; in squashfs_readpage()
442 bytes = i_size_read(inode) & (msblk->block_size - 1); in squashfs_readpage()