Lines Matching refs:subreq

392 static enum netfs_io_source cachefiles_prepare_read(struct netfs_io_subrequest *subreq,  in cachefiles_prepare_read()  argument
396 struct netfs_io_request *rreq = subreq->rreq; in cachefiles_prepare_read()
408 _enter("%zx @%llx/%llx", subreq->len, subreq->start, i_size); in cachefiles_prepare_read()
410 if (subreq->start >= i_size) { in cachefiles_prepare_read()
417 __set_bit(NETFS_SREQ_COPY_TO_CACHE, &subreq->flags); in cachefiles_prepare_read()
419 if (!test_bit(NETFS_SREQ_ONDEMAND, &subreq->flags)) in cachefiles_prepare_read()
440 off = vfs_llseek(file, subreq->start, SEEK_DATA); in cachefiles_prepare_read()
452 if (off >= subreq->start + subreq->len) { in cachefiles_prepare_read()
457 if (off > subreq->start) { in cachefiles_prepare_read()
459 subreq->len = off - subreq->start; in cachefiles_prepare_read()
466 to = vfs_llseek(file, subreq->start, SEEK_HOLE); in cachefiles_prepare_read()
474 if (to < subreq->start + subreq->len) { in cachefiles_prepare_read()
475 if (subreq->start + subreq->len >= i_size) in cachefiles_prepare_read()
479 subreq->len = to - subreq->start; in cachefiles_prepare_read()
487 __set_bit(NETFS_SREQ_COPY_TO_CACHE, &subreq->flags); in cachefiles_prepare_read()
488 if (test_bit(NETFS_SREQ_ONDEMAND, &subreq->flags)) { in cachefiles_prepare_read()
489 rc = cachefiles_ondemand_read(object, subreq->start, in cachefiles_prepare_read()
490 subreq->len); in cachefiles_prepare_read()
492 __clear_bit(NETFS_SREQ_ONDEMAND, &subreq->flags); in cachefiles_prepare_read()
500 trace_cachefiles_prep_read(subreq, ret, why, ino); in cachefiles_prepare_read()