Lines Matching refs:msblk

70 	struct squashfs_sb_info *msblk;  in squashfs_fill_super()  local
81 sb->s_fs_info = kzalloc(sizeof(*msblk), GFP_KERNEL); in squashfs_fill_super()
86 msblk = sb->s_fs_info; in squashfs_fill_super()
88 msblk->devblksize = sb_min_blocksize(sb, SQUASHFS_DEVBLK_SIZE); in squashfs_fill_super()
89 msblk->devblksize_log2 = ffz(~msblk->devblksize); in squashfs_fill_super()
91 mutex_init(&msblk->meta_index_mutex); in squashfs_fill_super()
99 msblk->bytes_used = sizeof(*sblk); in squashfs_fill_super()
121 msblk->decompressor = supported_squashfs_filesystem( in squashfs_fill_super()
126 if (msblk->decompressor == NULL) in squashfs_fill_super()
131 msblk->bytes_used = le64_to_cpu(sblk->bytes_used); in squashfs_fill_super()
132 if (msblk->bytes_used < 0 || msblk->bytes_used > in squashfs_fill_super()
137 msblk->block_size = le32_to_cpu(sblk->block_size); in squashfs_fill_super()
138 if (msblk->block_size > SQUASHFS_FILE_MAX_SIZE) in squashfs_fill_super()
145 if (PAGE_SIZE > msblk->block_size) { in squashfs_fill_super()
147 "currently not supported!", msblk->block_size); in squashfs_fill_super()
152 msblk->block_log = le16_to_cpu(sblk->block_log); in squashfs_fill_super()
153 if (msblk->block_log > SQUASHFS_FILE_MAX_LOG) in squashfs_fill_super()
157 if (msblk->block_size != (1 << msblk->block_log)) in squashfs_fill_super()
165 msblk->inode_table = le64_to_cpu(sblk->inode_table_start); in squashfs_fill_super()
166 msblk->directory_table = le64_to_cpu(sblk->directory_table_start); in squashfs_fill_super()
167 msblk->inodes = le32_to_cpu(sblk->inodes); in squashfs_fill_super()
168 msblk->fragments = le32_to_cpu(sblk->fragments); in squashfs_fill_super()
176 TRACE("Filesystem size %lld bytes\n", msblk->bytes_used); in squashfs_fill_super()
177 TRACE("Block size %d\n", msblk->block_size); in squashfs_fill_super()
178 TRACE("Number of inodes %d\n", msblk->inodes); in squashfs_fill_super()
179 TRACE("Number of fragments %d\n", msblk->fragments); in squashfs_fill_super()
181 TRACE("sblk->inode_table_start %llx\n", msblk->inode_table); in squashfs_fill_super()
182 TRACE("sblk->directory_table_start %llx\n", msblk->directory_table); in squashfs_fill_super()
196 msblk->block_cache = squashfs_cache_init("metadata", in squashfs_fill_super()
198 if (msblk->block_cache == NULL) in squashfs_fill_super()
202 msblk->read_page = squashfs_cache_init("data", in squashfs_fill_super()
203 squashfs_max_decompressors(), msblk->block_size); in squashfs_fill_super()
204 if (msblk->read_page == NULL) { in squashfs_fill_super()
209 msblk->stream = squashfs_decompressor_setup(sb, flags); in squashfs_fill_super()
210 if (IS_ERR(msblk->stream)) { in squashfs_fill_super()
211 err = PTR_ERR(msblk->stream); in squashfs_fill_super()
212 msblk->stream = NULL; in squashfs_fill_super()
220 next_table = msblk->bytes_used; in squashfs_fill_super()
225 msblk->xattr_id_table = squashfs_read_xattr_id_table(sb, in squashfs_fill_super()
226 xattr_id_table_start, &msblk->xattr_table, &msblk->xattr_ids); in squashfs_fill_super()
227 if (IS_ERR(msblk->xattr_id_table)) { in squashfs_fill_super()
229 err = PTR_ERR(msblk->xattr_id_table); in squashfs_fill_super()
230 msblk->xattr_id_table = NULL; in squashfs_fill_super()
234 next_table = msblk->xattr_table; in squashfs_fill_super()
238 msblk->id_table = squashfs_read_id_index_table(sb, in squashfs_fill_super()
241 if (IS_ERR(msblk->id_table)) { in squashfs_fill_super()
243 err = PTR_ERR(msblk->id_table); in squashfs_fill_super()
244 msblk->id_table = NULL; in squashfs_fill_super()
247 next_table = le64_to_cpu(msblk->id_table[0]); in squashfs_fill_super()
255 msblk->inode_lookup_table = squashfs_read_inode_lookup_table(sb, in squashfs_fill_super()
256 lookup_table_start, next_table, msblk->inodes); in squashfs_fill_super()
257 if (IS_ERR(msblk->inode_lookup_table)) { in squashfs_fill_super()
259 err = PTR_ERR(msblk->inode_lookup_table); in squashfs_fill_super()
260 msblk->inode_lookup_table = NULL; in squashfs_fill_super()
263 next_table = le64_to_cpu(msblk->inode_lookup_table[0]); in squashfs_fill_super()
268 fragments = msblk->fragments; in squashfs_fill_super()
272 msblk->fragment_cache = squashfs_cache_init("fragment", in squashfs_fill_super()
273 SQUASHFS_CACHED_FRAGMENTS, msblk->block_size); in squashfs_fill_super()
274 if (msblk->fragment_cache == NULL) { in squashfs_fill_super()
280 msblk->fragment_index = squashfs_read_fragment_index_table(sb, in squashfs_fill_super()
282 if (IS_ERR(msblk->fragment_index)) { in squashfs_fill_super()
284 err = PTR_ERR(msblk->fragment_index); in squashfs_fill_super()
285 msblk->fragment_index = NULL; in squashfs_fill_super()
288 next_table = le64_to_cpu(msblk->fragment_index[0]); in squashfs_fill_super()
292 if (msblk->directory_table > next_table) { in squashfs_fill_super()
298 if (msblk->inode_table >= msblk->directory_table) { in squashfs_fill_super()
332 squashfs_cache_delete(msblk->block_cache); in squashfs_fill_super()
333 squashfs_cache_delete(msblk->fragment_cache); in squashfs_fill_super()
334 squashfs_cache_delete(msblk->read_page); in squashfs_fill_super()
335 squashfs_decompressor_destroy(msblk); in squashfs_fill_super()
336 kfree(msblk->inode_lookup_table); in squashfs_fill_super()
337 kfree(msblk->fragment_index); in squashfs_fill_super()
338 kfree(msblk->id_table); in squashfs_fill_super()
339 kfree(msblk->xattr_id_table); in squashfs_fill_super()
371 struct squashfs_sb_info *msblk = dentry->d_sb->s_fs_info; in squashfs_statfs() local
377 buf->f_bsize = msblk->block_size; in squashfs_statfs()
378 buf->f_blocks = ((msblk->bytes_used - 1) >> msblk->block_log) + 1; in squashfs_statfs()
380 buf->f_files = msblk->inodes; in squashfs_statfs()