Lines Matching refs:inode

61 static struct meta_index *locate_meta_index(struct inode *inode, int offset,  in locate_meta_index()  argument
65 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in locate_meta_index()
76 if (msblk->meta_index[i].inode_number == inode->i_ino && in locate_meta_index()
100 static struct meta_index *empty_meta_index(struct inode *inode, int offset, in empty_meta_index() argument
103 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in empty_meta_index()
149 meta->inode_number = inode->i_ino; in empty_meta_index()
161 static void release_meta_index(struct inode *inode, struct meta_index *meta) in release_meta_index() argument
163 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in release_meta_index()
237 static int fill_meta_index(struct inode *inode, int index, in fill_meta_index() argument
240 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in fill_meta_index()
241 int skip = calculate_skip(i_size_read(inode) >> msblk->block_log); in fill_meta_index()
245 u64 cur_index_block = squashfs_i(inode)->block_list_start; in fill_meta_index()
246 int cur_offset = squashfs_i(inode)->offset; in fill_meta_index()
247 u64 cur_data_block = squashfs_i(inode)->start; in fill_meta_index()
256 meta = locate_meta_index(inode, offset + 1, index); in fill_meta_index()
259 meta = empty_meta_index(inode, offset + 1, skip); in fill_meta_index()
286 long long res = read_indexes(inode->i_sb, blocks, in fill_meta_index()
313 release_meta_index(inode, meta); in fill_meta_index()
327 release_meta_index(inode, meta); in fill_meta_index()
336 static int read_blocklist(struct inode *inode, int index, u64 *block) in read_blocklist() argument
342 int res = fill_meta_index(inode, index, &start, &offset, block); in read_blocklist()
358 blks = read_indexes(inode->i_sb, index - res, &start, &offset); in read_blocklist()
367 res = squashfs_read_metadata(inode->i_sb, &size, &start, &offset, in read_blocklist()
377 struct inode *inode = page->mapping->host; in squashfs_readpage() local
378 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in squashfs_readpage()
387 int file_end = i_size_read(inode) >> msblk->block_log; in squashfs_readpage()
390 page->index, squashfs_i(inode)->start); in squashfs_readpage()
392 if (page->index >= ((i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> in squashfs_readpage()
396 if (index < file_end || squashfs_i(inode)->fragment_block == in squashfs_readpage()
403 int bsize = read_blocklist(inode, index, &block); in squashfs_readpage()
409 (i_size_read(inode) & (msblk->block_size - 1)) : in squashfs_readpage()
416 buffer = squashfs_get_datablock(inode->i_sb, in squashfs_readpage()
431 buffer = squashfs_get_fragment(inode->i_sb, in squashfs_readpage()
432 squashfs_i(inode)->fragment_block, in squashfs_readpage()
433 squashfs_i(inode)->fragment_size); in squashfs_readpage()
437 squashfs_i(inode)->fragment_block, in squashfs_readpage()
438 squashfs_i(inode)->fragment_size); in squashfs_readpage()
442 bytes = i_size_read(inode) & (msblk->block_size - 1); in squashfs_readpage()
443 offset = squashfs_i(inode)->fragment_offset; in squashfs_readpage()