Lines Matching refs:length
76 static int squashfs_bio_read(struct super_block *sb, u64 index, int length,
82 const u64 read_end = round_up(index + length, msblk->devblksize);
136 * filesystem), otherwise the length is obtained from the first two bytes of
137 * the metadata block. A bit in the length field indicates if the block
142 int squashfs_read_data(struct super_block *sb, u64 index, int length,
151 if (length) {
155 compressed = SQUASHFS_COMPRESSED_BLOCK(length);
156 length = SQUASHFS_COMPRESSED_SIZE_BLOCK(length);
158 index, compressed ? "" : "un", length, output->length);
179 /* Extract the length of the metadata block */
181 length = data[offset];
183 length |= data[offset + 1] << 8;
190 length |= data[0] << 8;
195 compressed = SQUASHFS_COMPRESSED(length);
196 length = SQUASHFS_COMPRESSED_SIZE(length);
200 compressed ? "" : "un", length);
202 if (length < 0 || length > output->length ||
203 (index + length) > msblk->bytes_used) {
209 *next_index = index + length;
211 res = squashfs_bio_read(sb, index, length, &bio, &offset);
220 res = squashfs_decompress(msblk, bio, offset, length, output);
222 res = copy_bio_to_actor(bio, output, offset, length);