Lines Matching refs:subreq
268 static enum netfs_read_source cachefiles_prepare_read(struct netfs_read_subrequest *subreq, in cachefiles_prepare_read() argument
271 struct fscache_retrieval *op = subreq->rreq->cache_resources.cache_priv; in cachefiles_prepare_read()
275 struct file *file = subreq->rreq->cache_resources.cache_priv2; in cachefiles_prepare_read()
278 _enter("%zx @%llx/%llx", subreq->len, subreq->start, i_size); in cachefiles_prepare_read()
288 if (subreq->start >= i_size) in cachefiles_prepare_read()
293 off = vfs_llseek(file, subreq->start, SEEK_DATA); in cachefiles_prepare_read()
300 if (off >= subreq->start + subreq->len) in cachefiles_prepare_read()
303 if (off > subreq->start) { in cachefiles_prepare_read()
305 subreq->len = off - subreq->start; in cachefiles_prepare_read()
309 to = vfs_llseek(file, subreq->start, SEEK_HOLE); in cachefiles_prepare_read()
313 if (to < subreq->start + subreq->len) { in cachefiles_prepare_read()
314 if (subreq->start + subreq->len >= i_size) in cachefiles_prepare_read()
318 subreq->len = to - subreq->start; in cachefiles_prepare_read()
325 if (cachefiles_has_space(cache, 0, (subreq->len + PAGE_SIZE - 1) / PAGE_SIZE) == 0) in cachefiles_prepare_read()
326 __set_bit(NETFS_SREQ_WRITE_TO_CACHE, &subreq->flags); in cachefiles_prepare_read()