Lines Matching refs:msblk

81 	struct squashfs_sb_info *msblk;  in squashfs_fill_super()  local
93 sb->s_fs_info = kzalloc(sizeof(*msblk), GFP_KERNEL); in squashfs_fill_super()
98 msblk = sb->s_fs_info; in squashfs_fill_super()
100 msblk->devblksize = sb_min_blocksize(sb, SQUASHFS_DEVBLK_SIZE); in squashfs_fill_super()
101 msblk->devblksize_log2 = ffz(~msblk->devblksize); in squashfs_fill_super()
103 mutex_init(&msblk->meta_index_mutex); in squashfs_fill_super()
111 msblk->bytes_used = sizeof(*sblk); in squashfs_fill_super()
133 msblk->decompressor = supported_squashfs_filesystem( in squashfs_fill_super()
137 if (msblk->decompressor == NULL) in squashfs_fill_super()
142 msblk->bytes_used = le64_to_cpu(sblk->bytes_used); in squashfs_fill_super()
143 if (msblk->bytes_used < 0 || msblk->bytes_used > in squashfs_fill_super()
148 msblk->block_size = le32_to_cpu(sblk->block_size); in squashfs_fill_super()
149 if (msblk->block_size > SQUASHFS_FILE_MAX_SIZE) in squashfs_fill_super()
156 if (PAGE_CACHE_SIZE > msblk->block_size) { in squashfs_fill_super()
158 "currently not supported!\n", msblk->block_size); in squashfs_fill_super()
163 msblk->block_log = le16_to_cpu(sblk->block_log); in squashfs_fill_super()
164 if (msblk->block_log > SQUASHFS_FILE_MAX_LOG) in squashfs_fill_super()
168 if (msblk->block_size != (1 << msblk->block_log)) in squashfs_fill_super()
176 msblk->inode_table = le64_to_cpu(sblk->inode_table_start); in squashfs_fill_super()
177 msblk->directory_table = le64_to_cpu(sblk->directory_table_start); in squashfs_fill_super()
178 msblk->inodes = le32_to_cpu(sblk->inodes); in squashfs_fill_super()
186 TRACE("Filesystem size %lld bytes\n", msblk->bytes_used); in squashfs_fill_super()
187 TRACE("Block size %d\n", msblk->block_size); in squashfs_fill_super()
188 TRACE("Number of inodes %d\n", msblk->inodes); in squashfs_fill_super()
191 TRACE("sblk->inode_table_start %llx\n", msblk->inode_table); in squashfs_fill_super()
192 TRACE("sblk->directory_table_start %llx\n", msblk->directory_table); in squashfs_fill_super()
204 msblk->block_cache = squashfs_cache_init("metadata", in squashfs_fill_super()
206 if (msblk->block_cache == NULL) in squashfs_fill_super()
210 msblk->read_page = squashfs_cache_init("data", in squashfs_fill_super()
211 squashfs_max_decompressors(), msblk->block_size); in squashfs_fill_super()
212 if (msblk->read_page == NULL) { in squashfs_fill_super()
217 msblk->stream = squashfs_decompressor_setup(sb, flags); in squashfs_fill_super()
218 if (IS_ERR(msblk->stream)) { in squashfs_fill_super()
219 err = PTR_ERR(msblk->stream); in squashfs_fill_super()
220 msblk->stream = NULL; in squashfs_fill_super()
228 next_table = msblk->bytes_used; in squashfs_fill_super()
233 msblk->xattr_id_table = squashfs_read_xattr_id_table(sb, in squashfs_fill_super()
234 xattr_id_table_start, &msblk->xattr_table, &msblk->xattr_ids); in squashfs_fill_super()
235 if (IS_ERR(msblk->xattr_id_table)) { in squashfs_fill_super()
237 err = PTR_ERR(msblk->xattr_id_table); in squashfs_fill_super()
238 msblk->xattr_id_table = NULL; in squashfs_fill_super()
242 next_table = msblk->xattr_table; in squashfs_fill_super()
246 msblk->id_table = squashfs_read_id_index_table(sb, in squashfs_fill_super()
249 if (IS_ERR(msblk->id_table)) { in squashfs_fill_super()
251 err = PTR_ERR(msblk->id_table); in squashfs_fill_super()
252 msblk->id_table = NULL; in squashfs_fill_super()
255 next_table = le64_to_cpu(msblk->id_table[0]); in squashfs_fill_super()
263 msblk->inode_lookup_table = squashfs_read_inode_lookup_table(sb, in squashfs_fill_super()
264 lookup_table_start, next_table, msblk->inodes); in squashfs_fill_super()
265 if (IS_ERR(msblk->inode_lookup_table)) { in squashfs_fill_super()
267 err = PTR_ERR(msblk->inode_lookup_table); in squashfs_fill_super()
268 msblk->inode_lookup_table = NULL; in squashfs_fill_super()
271 next_table = le64_to_cpu(msblk->inode_lookup_table[0]); in squashfs_fill_super()
280 msblk->fragment_cache = squashfs_cache_init("fragment", in squashfs_fill_super()
281 SQUASHFS_CACHED_FRAGMENTS, msblk->block_size); in squashfs_fill_super()
282 if (msblk->fragment_cache == NULL) { in squashfs_fill_super()
288 msblk->fragment_index = squashfs_read_fragment_index_table(sb, in squashfs_fill_super()
290 if (IS_ERR(msblk->fragment_index)) { in squashfs_fill_super()
292 err = PTR_ERR(msblk->fragment_index); in squashfs_fill_super()
293 msblk->fragment_index = NULL; in squashfs_fill_super()
296 next_table = le64_to_cpu(msblk->fragment_index[0]); in squashfs_fill_super()
300 if (msblk->directory_table > next_table) { in squashfs_fill_super()
306 if (msblk->inode_table >= msblk->directory_table) { in squashfs_fill_super()
338 squashfs_cache_delete(msblk->block_cache); in squashfs_fill_super()
339 squashfs_cache_delete(msblk->fragment_cache); in squashfs_fill_super()
340 squashfs_cache_delete(msblk->read_page); in squashfs_fill_super()
341 squashfs_decompressor_destroy(msblk); in squashfs_fill_super()
342 kfree(msblk->inode_lookup_table); in squashfs_fill_super()
343 kfree(msblk->fragment_index); in squashfs_fill_super()
344 kfree(msblk->id_table); in squashfs_fill_super()
345 kfree(msblk->xattr_id_table); in squashfs_fill_super()
355 struct squashfs_sb_info *msblk = dentry->d_sb->s_fs_info; in squashfs_statfs() local
361 buf->f_bsize = msblk->block_size; in squashfs_statfs()
362 buf->f_blocks = ((msblk->bytes_used - 1) >> msblk->block_log) + 1; in squashfs_statfs()
364 buf->f_files = msblk->inodes; in squashfs_statfs()