| /linux/fs/netfs/ |
| H A D | read_collect.c | 33 if (subreq->start + subreq->transferred >= subreq->rreq->i_size) in netfs_clear_unread() 42 static void netfs_unlock_read_folio(struct netfs_io_request *rreq, in netfs_unlock_read_folio() argument 49 if (unlikely(folio_pos(folio) < rreq->abandon_to)) { in netfs_unlock_read_folio() 57 if (!test_bit(NETFS_RREQ_USE_PGPRIV2, &rreq->flags)) { in netfs_unlock_read_folio() 68 if (test_bit(NETFS_RREQ_FOLIO_COPY_TO_CACHE, &rreq->flags)) { in netfs_unlock_read_folio() 81 if (test_bit(NETFS_RREQ_FOLIO_COPY_TO_CACHE, &rreq->flags)) in netfs_unlock_read_folio() 82 netfs_pgpriv2_copy_to_cache(rreq, folio); in netfs_unlock_read_folio() 86 if (folio->index == rreq->no_unlock_folio && in netfs_unlock_read_folio() 87 test_bit(NETFS_RREQ_NO_UNLOCK_FOLIO, &rreq->flags)) { in netfs_unlock_read_folio() 100 static void netfs_read_unlock_folios(struct netfs_io_request *rreq, in netfs_read_unlock_folios() argument [all …]
|
| H A D | objects.c | 26 struct netfs_io_request *rreq; in netfs_alloc_request() local 32 rreq = mempool_alloc(mempool, GFP_KERNEL); in netfs_alloc_request() 33 if (rreq) in netfs_alloc_request() 38 memset(rreq, 0, kmem_cache_size(cache)); in netfs_alloc_request() 39 INIT_WORK(&rreq->cleanup_work, netfs_free_request); in netfs_alloc_request() 40 rreq->start = start; in netfs_alloc_request() 41 rreq->len = len; in netfs_alloc_request() 42 rreq->origin = origin; in netfs_alloc_request() 43 rreq->netfs_ops = ctx->ops; in netfs_alloc_request() 44 rreq->mapping = mapping; in netfs_alloc_request() [all …]
|
| H A D | direct_read.c | 21 struct netfs_io_request *rreq = subreq->rreq; in netfs_prepare_dio_read_iterator() local 24 rsize = umin(subreq->len, rreq->io_streams[0].sreq_max_len); in netfs_prepare_dio_read_iterator() 27 if (unlikely(rreq->io_streams[0].sreq_max_segs)) { in netfs_prepare_dio_read_iterator() 28 size_t limit = netfs_limit_iter(&rreq->buffer.iter, 0, rsize, in netfs_prepare_dio_read_iterator() 29 rreq->io_streams[0].sreq_max_segs); in netfs_prepare_dio_read_iterator() 39 subreq->io_iter = rreq->buffer.iter; in netfs_prepare_dio_read_iterator() 41 iov_iter_advance(&rreq->buffer.iter, subreq->len); in netfs_prepare_dio_read_iterator() 48 static int netfs_dispatch_unbuffered_reads(struct netfs_io_request *rreq) in netfs_dispatch_unbuffered_reads() argument 50 struct netfs_io_stream *stream = &rreq->io_streams[0]; in netfs_dispatch_unbuffered_reads() 51 unsigned long long start = rreq->start; in netfs_dispatch_unbuffered_reads() [all …]
|
| H A D | buffered_read.c | 12 static void netfs_cache_expand_readahead(struct netfs_io_request *rreq, in netfs_cache_expand_readahead() argument 17 struct netfs_cache_resources *cres = &rreq->cache_resources; in netfs_cache_expand_readahead() 23 static void netfs_rreq_expand(struct netfs_io_request *rreq, in netfs_rreq_expand() argument 29 netfs_cache_expand_readahead(rreq, &rreq->start, &rreq->len, rreq->i_size); in netfs_rreq_expand() 34 if (rreq->netfs_ops->expand_readahead) in netfs_rreq_expand() 35 rreq->netfs_ops->expand_readahead(rreq); in netfs_rreq_expand() 46 if (rreq->start != readahead_pos(ractl) || in netfs_rreq_expand() 47 rreq->len != readahead_length(ractl)) { in netfs_rreq_expand() 48 readahead_expand(ractl, rreq->start, rreq->len); in netfs_rreq_expand() 49 rreq->start = readahead_pos(ractl); in netfs_rreq_expand() [all …]
|
| H A D | misc.c | 320 void netfs_wake_collector(struct netfs_io_request *rreq) in netfs_wake_collector() argument 322 if (test_bit(NETFS_RREQ_OFFLOAD_COLLECTION, &rreq->flags) && in netfs_wake_collector() 323 !test_bit(NETFS_RREQ_RETRYING, &rreq->flags)) { in netfs_wake_collector() 324 queue_work(system_dfl_wq, &rreq->work); in netfs_wake_collector() 326 trace_netfs_rreq(rreq, netfs_rreq_trace_wake_queue); in netfs_wake_collector() 327 wake_up(&rreq->waitq); in netfs_wake_collector() 337 struct netfs_io_request *rreq = subreq->rreq; in netfs_subreq_clear_in_progress() local 338 struct netfs_io_stream *stream = &rreq->io_streams[subreq->stream_nr]; in netfs_subreq_clear_in_progress() 345 test_bit(NETFS_RREQ_RETRYING, &rreq->flags)) in netfs_subreq_clear_in_progress() 346 netfs_wake_collector(rreq); in netfs_subreq_clear_in_progress() [all …]
|
| H A D | read_single.c | 56 static int netfs_single_begin_cache_read(struct netfs_io_request *rreq, struct netfs_inode *ctx) in netfs_single_begin_cache_read() argument 58 return fscache_begin_read_operation(&rreq->cache_resources, netfs_i_cookie(ctx)); in netfs_single_begin_cache_read() 61 static void netfs_single_cache_prepare_read(struct netfs_io_request *rreq, in netfs_single_cache_prepare_read() argument 64 struct netfs_cache_resources *cres = &rreq->cache_resources; in netfs_single_cache_prepare_read() 70 subreq->source = cres->ops->prepare_read(subreq, rreq->i_size); in netfs_single_cache_prepare_read() 75 static void netfs_single_read_cache(struct netfs_io_request *rreq, in netfs_single_read_cache() argument 78 struct netfs_cache_resources *cres = &rreq->cache_resources; in netfs_single_read_cache() 80 _enter("R=%08x[%x]", rreq->debug_id, subreq->debug_index); in netfs_single_read_cache() 90 static int netfs_single_dispatch_read(struct netfs_io_request *rreq) in netfs_single_dispatch_read() argument 92 struct netfs_io_stream *stream = &rreq->io_streams[0]; in netfs_single_dispatch_read() [all …]
|
| H A D | internal.h | 46 static inline void netfs_proc_add_rreq(struct netfs_io_request *rreq) in netfs_proc_add_rreq() argument 49 list_add_tail_rcu(&rreq->proc_link, &netfs_io_requests); in netfs_proc_add_rreq() 52 static inline void netfs_proc_del_rreq(struct netfs_io_request *rreq) in netfs_proc_del_rreq() argument 54 if (!list_empty(&rreq->proc_link)) { in netfs_proc_del_rreq() 56 list_del_rcu(&rreq->proc_link); in netfs_proc_del_rreq() 61 static inline void netfs_proc_add_rreq(struct netfs_io_request *rreq) {} in netfs_proc_add_rreq() argument 62 static inline void netfs_proc_del_rreq(struct netfs_io_request *rreq) {} in netfs_proc_del_rreq() argument 68 struct folio_queue *netfs_buffer_make_space(struct netfs_io_request *rreq, 71 void netfs_wake_collector(struct netfs_io_request *rreq); 73 void netfs_wait_for_in_progress_stream(struct netfs_io_request *rreq, [all …]
|
| H A D | main.c | 57 struct netfs_io_request *rreq; in netfs_requests_seq_show() local 67 rreq = list_entry(v, struct netfs_io_request, proc_link); in netfs_requests_seq_show() 70 rreq->debug_id, in netfs_requests_seq_show() 71 netfs_origins[rreq->origin], in netfs_requests_seq_show() 72 refcount_read(&rreq->ref), in netfs_requests_seq_show() 73 rreq->flags, in netfs_requests_seq_show() 74 rreq->error, in netfs_requests_seq_show() 76 rreq->start, rreq->submitted, rreq->len); in netfs_requests_seq_show()
|
| H A D | read_pgpriv2.c | 98 struct netfs_io_request *rreq, struct folio *folio) in netfs_pgpriv2_begin_copy_to_cache() argument 102 if (!fscache_resources_valid(&rreq->cache_resources)) in netfs_pgpriv2_begin_copy_to_cache() 105 creq = netfs_create_write_req(rreq->mapping, NULL, folio_pos(folio), in netfs_pgpriv2_begin_copy_to_cache() 114 trace_netfs_copy2cache(rreq, creq); in netfs_pgpriv2_begin_copy_to_cache() 117 rreq->copy_to_cache = creq; in netfs_pgpriv2_begin_copy_to_cache() 123 rreq->copy_to_cache = ERR_PTR(-ENOBUFS); in netfs_pgpriv2_begin_copy_to_cache() 124 clear_bit(NETFS_RREQ_FOLIO_COPY_TO_CACHE, &rreq->flags); in netfs_pgpriv2_begin_copy_to_cache() 132 void netfs_pgpriv2_copy_to_cache(struct netfs_io_request *rreq, struct folio *folio) in netfs_pgpriv2_copy_to_cache() argument 134 struct netfs_io_request *creq = rreq->copy_to_cache; in netfs_pgpriv2_copy_to_cache() 137 creq = netfs_pgpriv2_begin_copy_to_cache(rreq, folio); in netfs_pgpriv2_copy_to_cache() [all …]
|
| H A D | write_collect.c | 24 static void netfs_dump_request(const struct netfs_io_request *rreq) in netfs_dump_request() argument 27 rreq->debug_id, refcount_read(&rreq->ref), rreq->flags, in netfs_dump_request() 28 rreq->origin, rreq->error); in netfs_dump_request() 30 rreq->start, rreq->transferred, rreq->submitted, rreq->len); in netfs_dump_request() 32 rreq->cleaned_to, rreq->collected_to, atomic64_read(&rreq->issued_to)); in netfs_dump_request() 33 pr_err(" iw=%pSR\n", rreq->netfs_ops->issue_write); in netfs_dump_request() 36 const struct netfs_io_stream *s = &rreq->io_streams[i]; in netfs_dump_request() 444 struct netfs_io_request *rreq = container_of(work, struct netfs_io_request, work); in netfs_write_collection_worker() local 446 netfs_see_request(rreq, netfs_rreq_trace_see_work); in netfs_write_collection_worker() 447 if (netfs_check_rreq_in_progress(rreq)) { in netfs_write_collection_worker() [all …]
|
| /linux/include/trace/events/ |
| H A D | netfs.h | 288 TP_PROTO(struct netfs_io_request *rreq, 292 TP_ARGS(rreq, start, len, what), 295 __field(unsigned int, rreq) 305 __entry->rreq = rreq->debug_id; 306 __entry->cookie = rreq->cache_resources.debug_id; 307 __entry->i_size = rreq->i_size; 311 __entry->netfs_inode = rreq->inode->i_ino; 315 __entry->rreq, 323 TP_PROTO(struct netfs_io_request *rreq, 326 TP_ARGS(rreq, what), [all …]
|
| H A D | afs.h | 1814 __field(unsigned int, rreq) 1825 __entry->rreq = op->fetch.subreq->rreq->debug_id; 1832 __entry->rreq, __entry->sreq,
|
| /linux/fs/afs/ |
| H A D | file.c | 335 struct afs_vnode *vnode = AFS_FS_I(subreq->rreq->inode); in afs_issue_read() 336 struct key *key = subreq->rreq->netfs_priv; in afs_issue_read() 359 if (subreq->rreq->origin == NETFS_READAHEAD || in afs_issue_read() 360 subreq->rreq->iocb) { in afs_issue_read() 380 static int afs_init_request(struct netfs_io_request *rreq, struct file *file) in afs_init_request() argument 382 struct afs_vnode *vnode = AFS_FS_I(rreq->inode); in afs_init_request() 385 rreq->netfs_priv = key_get(afs_file_key(file)); in afs_init_request() 386 rreq->rsize = 256 * 1024; in afs_init_request() 387 rreq->wsize = 256 * 1024 * 1024; in afs_init_request() 389 switch (rreq->origin) { in afs_init_request() [all …]
|
| H A D | write.c | 92 struct netfs_io_stream *stream = &subreq->rreq->io_streams[subreq->stream_nr]; in afs_prepare_write() 106 struct netfs_io_request *wreq = subreq->rreq; in afs_issue_write_worker()
|
| /linux/net/9p/ |
| H A D | trans_fd.c | 84 struct p9_req_t *rreq; member 279 if ((!m->rreq) && (m->rc.offset == m->rc.capacity)) { in p9_read_work() 295 m->rreq = p9_tag_lookup(m->client, m->rc.tag); in p9_read_work() 296 if (!m->rreq || (m->rreq->status != REQ_STATUS_SENT)) { in p9_read_work() 303 if (m->rc.size > m->rreq->rc.capacity) { in p9_read_work() 306 m->rc.size, m->rc.tag, m->rreq->rc.capacity); in p9_read_work() 311 if (!m->rreq->rc.sdata) { in p9_read_work() 314 m->rc.tag, m->rreq); in p9_read_work() 315 p9_req_put(m->client, m->rreq); in p9_read_work() 316 m->rreq = NULL; in p9_read_work() [all …]
|
| /linux/fs/ceph/ |
| H A D | addr.c | 168 static void ceph_netfs_expand_readahead(struct netfs_io_request *rreq) in ceph_netfs_expand_readahead() argument 170 struct inode *inode = rreq->inode; in ceph_netfs_expand_readahead() 174 loff_t end = rreq->start + rreq->len, new_end; in ceph_netfs_expand_readahead() 175 struct ceph_netfs_request_data *priv = rreq->netfs_priv; in ceph_netfs_expand_readahead() 199 new_end = umin(round_up(end, lo->stripe_unit), rreq->i_size); in ceph_netfs_expand_readahead() 200 if (new_end > end && new_end <= rreq->start + max_len) in ceph_netfs_expand_readahead() 201 rreq->len = new_end - rreq->start; in ceph_netfs_expand_readahead() 204 div_u64_rem(rreq->start, lo->stripe_unit, &blockoff); in ceph_netfs_expand_readahead() 205 if (rreq->len + blockoff <= max_len) { in ceph_netfs_expand_readahead() 206 rreq->start -= blockoff; in ceph_netfs_expand_readahead() [all …]
|
| /linux/tools/net/ynl/samples/ |
| H A D | ethtool.c | 14 struct ethtool_rings_get_req_dump rreq = {}; in main() local 41 rreq._present.header = 1; /* ethtool needs an empty nest.. */ in main() 42 rings = ethtool_rings_get_dump(ys, &rreq); in main()
|
| /linux/include/linux/ |
| H A D | netfs.h | 175 struct netfs_io_request *rreq; /* Supervising I/O request */ member 291 int (*init_request)(struct netfs_io_request *rreq, struct file *file); 292 void (*free_request)(struct netfs_io_request *rreq); 293 void (*free_subrequest)(struct netfs_io_subrequest *rreq); 296 void (*expand_readahead)(struct netfs_io_request *rreq); 299 bool (*is_still_valid)(struct netfs_io_request *rreq); 302 void (*done)(struct netfs_io_request *rreq);
|
| /linux/fs/smb/client/ |
| H A D | file.c | 53 struct netfs_io_stream *stream = &req->rreq.io_streams[subreq->stream_nr]; in cifs_prepare_write() 56 struct cifs_sb_info *cifs_sb = CIFS_SB(wdata->rreq->inode->i_sb); in cifs_prepare_write() 57 size_t wsize = req->rreq.wsize; in cifs_prepare_write() 90 wdata->credits.rreq_debug_id = subreq->rreq->debug_id; in cifs_prepare_write() 93 trace_smb3_rw_credits(wdata->rreq->debug_id, in cifs_prepare_write() 117 struct cifs_sb_info *sbi = CIFS_SB(subreq->rreq->inode->i_sb); in cifs_issue_write() 157 struct netfs_io_request *rreq = subreq->rreq; in cifs_prepare_read() local 159 struct cifs_io_request *req = container_of(subreq->rreq, struct cifs_io_request, rreq); in cifs_prepare_read() 161 struct cifs_sb_info *cifs_sb = CIFS_SB(rreq->inode->i_sb); in cifs_prepare_read() 182 rreq->io_streams[0].sreq_max_len = size; in cifs_prepare_read() [all …]
|
| H A D | smb2pdu.c | 4523 trace_smb3_read_enter(rdata ? rdata->rreq->debug_id : 0, in smb2_new_read_req() 4590 struct netfs_inode *ictx = netfs_inode(rdata->rreq->inode); in smb2_readv_callback() 4596 .rreq_debug_id = rdata->rreq->debug_id, in smb2_readv_callback() 4600 unsigned int rreq_debug_id = rdata->rreq->debug_id; in smb2_readv_callback() 4673 trace_smb3_read_err(rdata->rreq->debug_id, in smb2_readv_callback() 4682 trace_smb3_read_done(rdata->rreq->debug_id, in smb2_readv_callback() 4787 trace_smb3_read_err(rdata->rreq->debug_id, in smb2_async_readv() 4897 .rreq_debug_id = wdata->rreq->debug_id, in smb2_writev_callback() 4900 unsigned int rreq_debug_id = wdata->rreq->debug_id; in smb2_writev_callback() 4976 trace_smb3_write_err(wdata->rreq->debug_id, in smb2_writev_callback() [all …]
|
| /linux/drivers/infiniband/sw/siw/ |
| H A D | siw_qp_rx.c | 661 uint64_t raddr = be64_to_cpu(srx->hdr.rreq.sink_to), in siw_init_rresp() 662 laddr = be64_to_cpu(srx->hdr.rreq.source_to); in siw_init_rresp() 663 uint32_t length = be32_to_cpu(srx->hdr.rreq.read_size), in siw_init_rresp() 664 lkey = be32_to_cpu(srx->hdr.rreq.source_stag), in siw_init_rresp() 665 rkey = be32_to_cpu(srx->hdr.rreq.sink_stag), in siw_init_rresp() 666 msn = be32_to_cpu(srx->hdr.rreq.ddp_msn); in siw_init_rresp() 1132 struct siw_sqe *rreq; in siw_check_tx_fence() local 1139 rreq = orq_get_current(qp); in siw_check_tx_fence() 1140 WRITE_ONCE(rreq->flags, 0); in siw_check_tx_fence() 1156 rreq = orq_get_free(qp); in siw_check_tx_fence() [all …]
|
| H A D | siw_qp_tx.c | 130 c_tx->pkt.rreq.rsvd = 0; in siw_qp_prepare_tx() 131 c_tx->pkt.rreq.ddp_qn = htonl(RDMAP_UNTAGGED_QN_RDMA_READ); in siw_qp_prepare_tx() 132 c_tx->pkt.rreq.ddp_msn = in siw_qp_prepare_tx() 134 c_tx->pkt.rreq.ddp_mo = 0; in siw_qp_prepare_tx() 135 c_tx->pkt.rreq.sink_stag = htonl(wqe->sqe.sge[0].lkey); in siw_qp_prepare_tx() 136 c_tx->pkt.rreq.sink_to = in siw_qp_prepare_tx() 138 c_tx->pkt.rreq.source_stag = htonl(wqe->sqe.rkey); in siw_qp_prepare_tx() 139 c_tx->pkt.rreq.source_to = cpu_to_be64(wqe->sqe.raddr); in siw_qp_prepare_tx() 140 c_tx->pkt.rreq.read_size = htonl(wqe->sqe.sge[0].length); in siw_qp_prepare_tx()
|
| H A D | siw.h | 351 struct iwarp_rdma_rreq rreq; member 371 struct iwarp_rdma_rreq rreq; member 521 void siw_read_to_orq(struct siw_sqe *rreq, struct siw_sqe *sqe);
|
| H A D | iwarp.h | 276 struct iwarp_rdma_rreq rreq; member
|
| /linux/fs/cachefiles/ |
| H A D | io.c | 499 return cachefiles_do_prepare_read(&subreq->rreq->cache_resources, in cachefiles_prepare_read() 501 &subreq->flags, subreq->rreq->inode->i_ino); in cachefiles_prepare_read() 628 struct netfs_io_request *wreq = subreq->rreq; in cachefiles_prepare_write_subreq() 647 struct netfs_io_request *wreq = subreq->rreq; in cachefiles_issue_write() 709 cachefiles_write(&subreq->rreq->cache_resources, in cachefiles_issue_write()
|