• Home
  • Raw
  • Download

Lines Matching refs:msblk

81 	struct squashfs_sb_info *msblk;  in squashfs_fill_super()  local
92 sb->s_fs_info = kzalloc(sizeof(*msblk), GFP_KERNEL); in squashfs_fill_super()
97 msblk = sb->s_fs_info; in squashfs_fill_super()
99 msblk->devblksize = sb_min_blocksize(sb, SQUASHFS_DEVBLK_SIZE); in squashfs_fill_super()
100 msblk->devblksize_log2 = ffz(~msblk->devblksize); in squashfs_fill_super()
102 mutex_init(&msblk->meta_index_mutex); in squashfs_fill_super()
110 msblk->bytes_used = sizeof(*sblk); in squashfs_fill_super()
132 msblk->decompressor = supported_squashfs_filesystem( in squashfs_fill_super()
136 if (msblk->decompressor == NULL) in squashfs_fill_super()
141 msblk->bytes_used = le64_to_cpu(sblk->bytes_used); in squashfs_fill_super()
142 if (msblk->bytes_used < 0 || msblk->bytes_used > in squashfs_fill_super()
147 msblk->block_size = le32_to_cpu(sblk->block_size); in squashfs_fill_super()
148 if (msblk->block_size > SQUASHFS_FILE_MAX_SIZE) in squashfs_fill_super()
155 if (PAGE_SIZE > msblk->block_size) { in squashfs_fill_super()
157 "currently not supported!\n", msblk->block_size); in squashfs_fill_super()
162 msblk->block_log = le16_to_cpu(sblk->block_log); in squashfs_fill_super()
163 if (msblk->block_log > SQUASHFS_FILE_MAX_LOG) in squashfs_fill_super()
167 if (msblk->block_size != (1 << msblk->block_log)) in squashfs_fill_super()
175 msblk->inode_table = le64_to_cpu(sblk->inode_table_start); in squashfs_fill_super()
176 msblk->directory_table = le64_to_cpu(sblk->directory_table_start); in squashfs_fill_super()
177 msblk->inodes = le32_to_cpu(sblk->inodes); in squashfs_fill_super()
185 TRACE("Filesystem size %lld bytes\n", msblk->bytes_used); in squashfs_fill_super()
186 TRACE("Block size %d\n", msblk->block_size); in squashfs_fill_super()
187 TRACE("Number of inodes %d\n", msblk->inodes); in squashfs_fill_super()
190 TRACE("sblk->inode_table_start %llx\n", msblk->inode_table); in squashfs_fill_super()
191 TRACE("sblk->directory_table_start %llx\n", msblk->directory_table); in squashfs_fill_super()
203 msblk->block_cache = squashfs_cache_init("metadata", in squashfs_fill_super()
205 if (msblk->block_cache == NULL) in squashfs_fill_super()
209 msblk->read_page = squashfs_cache_init("data", in squashfs_fill_super()
210 squashfs_max_decompressors(), msblk->block_size); in squashfs_fill_super()
211 if (msblk->read_page == NULL) { in squashfs_fill_super()
216 msblk->stream = squashfs_decompressor_setup(sb, flags); in squashfs_fill_super()
217 if (IS_ERR(msblk->stream)) { in squashfs_fill_super()
218 err = PTR_ERR(msblk->stream); in squashfs_fill_super()
219 msblk->stream = NULL; in squashfs_fill_super()
227 next_table = msblk->bytes_used; in squashfs_fill_super()
232 msblk->xattr_id_table = squashfs_read_xattr_id_table(sb, in squashfs_fill_super()
233 xattr_id_table_start, &msblk->xattr_table, &msblk->xattr_ids); in squashfs_fill_super()
234 if (IS_ERR(msblk->xattr_id_table)) { in squashfs_fill_super()
236 err = PTR_ERR(msblk->xattr_id_table); in squashfs_fill_super()
237 msblk->xattr_id_table = NULL; in squashfs_fill_super()
241 next_table = msblk->xattr_table; in squashfs_fill_super()
245 msblk->id_table = squashfs_read_id_index_table(sb, in squashfs_fill_super()
248 if (IS_ERR(msblk->id_table)) { in squashfs_fill_super()
250 err = PTR_ERR(msblk->id_table); in squashfs_fill_super()
251 msblk->id_table = NULL; in squashfs_fill_super()
254 next_table = le64_to_cpu(msblk->id_table[0]); in squashfs_fill_super()
262 msblk->inode_lookup_table = squashfs_read_inode_lookup_table(sb, in squashfs_fill_super()
263 lookup_table_start, next_table, msblk->inodes); in squashfs_fill_super()
264 if (IS_ERR(msblk->inode_lookup_table)) { in squashfs_fill_super()
266 err = PTR_ERR(msblk->inode_lookup_table); in squashfs_fill_super()
267 msblk->inode_lookup_table = NULL; in squashfs_fill_super()
270 next_table = le64_to_cpu(msblk->inode_lookup_table[0]); in squashfs_fill_super()
279 msblk->fragment_cache = squashfs_cache_init("fragment", in squashfs_fill_super()
280 SQUASHFS_CACHED_FRAGMENTS, msblk->block_size); in squashfs_fill_super()
281 if (msblk->fragment_cache == NULL) { in squashfs_fill_super()
287 msblk->fragment_index = squashfs_read_fragment_index_table(sb, in squashfs_fill_super()
289 if (IS_ERR(msblk->fragment_index)) { in squashfs_fill_super()
291 err = PTR_ERR(msblk->fragment_index); in squashfs_fill_super()
292 msblk->fragment_index = NULL; in squashfs_fill_super()
295 next_table = le64_to_cpu(msblk->fragment_index[0]); in squashfs_fill_super()
299 if (msblk->directory_table > next_table) { in squashfs_fill_super()
305 if (msblk->inode_table >= msblk->directory_table) { in squashfs_fill_super()
337 squashfs_cache_delete(msblk->block_cache); in squashfs_fill_super()
338 squashfs_cache_delete(msblk->fragment_cache); in squashfs_fill_super()
339 squashfs_cache_delete(msblk->read_page); in squashfs_fill_super()
340 squashfs_decompressor_destroy(msblk); in squashfs_fill_super()
341 kfree(msblk->inode_lookup_table); in squashfs_fill_super()
342 kfree(msblk->fragment_index); in squashfs_fill_super()
343 kfree(msblk->id_table); in squashfs_fill_super()
344 kfree(msblk->xattr_id_table); in squashfs_fill_super()
354 struct squashfs_sb_info *msblk = dentry->d_sb->s_fs_info; in squashfs_statfs() local
360 buf->f_bsize = msblk->block_size; in squashfs_statfs()
361 buf->f_blocks = ((msblk->bytes_used - 1) >> msblk->block_log) + 1; in squashfs_statfs()
363 buf->f_files = msblk->inodes; in squashfs_statfs()