Lines Matching refs:length
67 struct squashfs_cache *cache, u64 block, int length) in squashfs_cache_get() argument
120 entry->length = squashfs_read_data(sb, entry->data, in squashfs_cache_get()
121 block, length, &entry->next_index, in squashfs_cache_get()
126 if (entry->length < 0) in squashfs_cache_get()
127 entry->error = entry->length; in squashfs_cache_get()
295 int offset, int length) in squashfs_copy_data() argument
297 int remaining = length; in squashfs_copy_data()
299 if (length == 0) in squashfs_copy_data()
302 return min(length, entry->length - offset); in squashfs_copy_data()
304 while (offset < entry->length) { in squashfs_copy_data()
307 int bytes = min_t(int, entry->length - offset, in squashfs_copy_data()
322 return length - remaining; in squashfs_copy_data()
333 u64 *block, int *offset, int length) in squashfs_read_metadata() argument
336 int bytes, copied = length; in squashfs_read_metadata()
341 while (length) { in squashfs_read_metadata()
345 else if (*offset >= entry->length) in squashfs_read_metadata()
348 bytes = squashfs_copy_data(buffer, entry, *offset, length); in squashfs_read_metadata()
351 length -= bytes; in squashfs_read_metadata()
354 if (*offset == entry->length) { in squashfs_read_metadata()
371 u64 start_block, int length) in squashfs_get_fragment() argument
376 length); in squashfs_get_fragment()
386 u64 start_block, int length) in squashfs_get_datablock() argument
390 return squashfs_cache_get(sb, msblk->read_page, start_block, length); in squashfs_get_datablock()
398 int length) in squashfs_read_table() argument
400 int pages = (length + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; in squashfs_read_table()
408 res = squashfs_read_data(sb, data, block, length | in squashfs_read_table()
409 SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, length, pages); in squashfs_read_table()