Lines Matching refs:length
53 struct squashfs_cache *cache, u64 block, int length) in squashfs_cache_get() argument
110 entry->length = squashfs_read_data(sb, block, length, in squashfs_cache_get()
115 if (entry->length < 0) in squashfs_cache_get()
116 entry->error = entry->length; in squashfs_cache_get()
294 int offset, int length) in squashfs_copy_data() argument
296 int remaining = length; in squashfs_copy_data()
298 if (length == 0) in squashfs_copy_data()
301 return min(length, entry->length - offset); in squashfs_copy_data()
303 while (offset < entry->length) { in squashfs_copy_data()
306 int bytes = min_t(int, entry->length - offset, in squashfs_copy_data()
321 return length - remaining; in squashfs_copy_data()
332 u64 *block, int *offset, int length) in squashfs_read_metadata() argument
335 int bytes, res = length; in squashfs_read_metadata()
340 if (unlikely(length < 0)) in squashfs_read_metadata()
343 while (length) { in squashfs_read_metadata()
348 } else if (*offset >= entry->length) { in squashfs_read_metadata()
353 bytes = squashfs_copy_data(buffer, entry, *offset, length); in squashfs_read_metadata()
356 length -= bytes; in squashfs_read_metadata()
359 if (*offset == entry->length) { in squashfs_read_metadata()
380 u64 start_block, int length) in squashfs_get_fragment() argument
385 length); in squashfs_get_fragment()
395 u64 start_block, int length) in squashfs_get_datablock() argument
399 return squashfs_cache_get(sb, msblk->read_page, start_block, length); in squashfs_get_datablock()
406 void *squashfs_read_table(struct super_block *sb, u64 block, int length) in squashfs_read_table() argument
408 int pages = (length + PAGE_SIZE - 1) >> PAGE_SHIFT; in squashfs_read_table()
413 table = buffer = kmalloc(length, GFP_KERNEL); in squashfs_read_table()
423 actor = squashfs_page_actor_init(data, pages, length); in squashfs_read_table()
432 res = squashfs_read_data(sb, block, length | in squashfs_read_table()