Lines Matching full:length

79 static int squashfs_bio_read(struct super_block *sb, u64 index, int length,  in squashfs_bio_read()  argument
85 const u64 read_end = round_up(index + length, msblk->devblksize); in squashfs_bio_read()
132 * Read and decompress a metadata block or datablock. Length is non-zero
134 * filesystem), otherwise the length is obtained from the first two bytes of
135 * the metadata block. A bit in the length field indicates if the block
140 int squashfs_read_data(struct super_block *sb, u64 index, int length, in squashfs_read_data() argument
149 if (length) { in squashfs_read_data()
153 compressed = SQUASHFS_COMPRESSED_BLOCK(length); in squashfs_read_data()
154 length = SQUASHFS_COMPRESSED_SIZE_BLOCK(length); in squashfs_read_data()
156 index, compressed ? "" : "un", length, output->length); in squashfs_read_data()
177 /* Extract the length of the metadata block */ in squashfs_read_data()
179 length = data[offset]; in squashfs_read_data()
181 length |= data[offset + 1] << 8; in squashfs_read_data()
188 length |= data[0] << 8; in squashfs_read_data()
194 compressed = SQUASHFS_COMPRESSED(length); in squashfs_read_data()
195 length = SQUASHFS_COMPRESSED_SIZE(length); in squashfs_read_data()
199 compressed ? "" : "un", length); in squashfs_read_data()
201 if (length < 0 || length > output->length || in squashfs_read_data()
202 (index + length) > msblk->bytes_used) { in squashfs_read_data()
208 *next_index = index + length; in squashfs_read_data()
210 res = squashfs_bio_read(sb, index, length, &bio, &offset); in squashfs_read_data()
219 res = squashfs_decompress(msblk, bio, offset, length, output); in squashfs_read_data()
221 res = copy_bio_to_actor(bio, output, offset, length); in squashfs_read_data()