Lines Matching +full:lookup +full:- +full:table

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Squashfs - a compressed read only filesystem for Linux
12 * This file implements code to handle compressed fragments (tail-end packed
16 * location on disk and compressed size using a fragment lookup table.
17 * Like everything in Squashfs this fragment lookup table is itself stored
18 * compressed into metadata blocks. A second index table is used to locate
19 * these. This second index table for speed of access (and because it
32 * Look-up fragment using the fragment index table. Return the on disk
38 struct squashfs_sb_info *msblk = sb->s_fs_info; in squashfs_frag_lookup()
43 if (fragment >= msblk->fragments) in squashfs_frag_lookup()
44 return -EIO; in squashfs_frag_lookup()
48 start_block = le64_to_cpu(msblk->fragment_index[block]); in squashfs_frag_lookup()
61 * Read the uncompressed fragment lookup table indexes off disk into memory
67 __le64 *table; in squashfs_read_fragment_index_table() local
70 * Sanity check, length bytes should not extend into the next table - in squashfs_read_fragment_index_table()
72 * incorrectly larger than the next table start in squashfs_read_fragment_index_table()
75 return ERR_PTR(-EINVAL); in squashfs_read_fragment_index_table()
77 table = squashfs_read_table(sb, fragment_table_start, length); in squashfs_read_fragment_index_table()
80 * table[0] points to the first fragment table metadata block, this in squashfs_read_fragment_index_table()
83 if (!IS_ERR(table) && le64_to_cpu(table[0]) >= fragment_table_start) { in squashfs_read_fragment_index_table()
84 kfree(table); in squashfs_read_fragment_index_table()
85 return ERR_PTR(-EINVAL); in squashfs_read_fragment_index_table()
88 return table; in squashfs_read_fragment_index_table()