Lines Matching defs:length
53 struct squashfs_cache *cache, u64 block, int length)
110 entry->length = squashfs_read_data(sb, block, length,
115 if (entry->length < 0)
116 entry->error = entry->length;
289 * Copy up to length bytes from cache entry to buffer starting at offset bytes
290 * into the cache entry. If there's not length bytes then copy the number of
294 int offset, int length)
296 int remaining = length;
298 if (length == 0)
301 return min(length, entry->length - offset);
303 while (offset < entry->length) {
306 int bytes = min_t(int, entry->length - offset,
321 return length - remaining;
326 * Read length bytes from metadata position <block, offset> (block is the
329 * and length bytes may require reading more than one block.
332 u64 *block, int *offset, int length)
335 int bytes, res = length;
340 if (unlikely(length < 0))
343 while (length) {
348 } else if (*offset >= entry->length) {
353 bytes = squashfs_copy_data(buffer, entry, *offset, length);
356 length -= bytes;
359 if (*offset == entry->length) {
380 u64 start_block, int length)
385 length);
395 u64 start_block, int length)
399 return squashfs_cache_get(sb, msblk->read_page, start_block, length);
406 void *squashfs_read_table(struct super_block *sb, u64 block, int length)
408 int pages = (length + PAGE_SIZE - 1) >> PAGE_SHIFT;
413 table = buffer = kmalloc(length, GFP_KERNEL);
423 actor = squashfs_page_actor_init(data, pages, length);
432 res = squashfs_read_data(sb, block, length |