@@ -4484,6 +4484,16 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
return rc;
}
+static void smb2_readv_worker(struct work_struct *work)
+{
+ struct cifs_io_subrequest *rdata =
+ container_of(work, struct cifs_io_subrequest, subreq.work);
+
+ netfs_subreq_terminated(&rdata->subreq,
+ (rdata->result == 0 || rdata->result == -EAGAIN) ?
+ rdata->got_bytes : rdata->result, true);
+}
+
static void
smb2_readv_callback(struct mid_q_entry *mid)
{
@@ -4578,9 +4588,8 @@ smb2_readv_callback(struct mid_q_entry *mid)
rdata->result = 0;
}
rdata->credits.value = 0;
- netfs_subreq_terminated(&rdata->subreq,
- (rdata->result == 0 || rdata->result == -EAGAIN) ?
- rdata->got_bytes : rdata->result, true);
+ INIT_WORK(&rdata->subreq.work, smb2_readv_worker);
+ queue_work(cifsiod_wq, &rdata->subreq.work);
release_mid(mid);
add_credits(server, &credits, 0);
}
@@ -412,6 +412,7 @@ TRACE_EVENT(netfs_folio,
__field(ino_t, ino)
__field(pgoff_t, index)
__field(unsigned int, nr)
+ __field(bool, ra_trigger)
__field(enum netfs_folio_trace, why)
),
@@ -420,11 +421,13 @@ TRACE_EVENT(netfs_folio,
__entry->why = why;
__entry->index = folio_index(folio);
__entry->nr = folio_nr_pages(folio);
+ __entry->ra_trigger = folio_test_readahead(folio);
),
- TP_printk("i=%05lx ix=%05lx-%05lx %s",
+ TP_printk("i=%05lx ix=%05lx-%05lx %s%s",
__entry->ino, __entry->index, __entry->index + __entry->nr - 1,
- __print_symbolic(__entry->why, netfs_folio_traces))
+ __print_symbolic(__entry->why, netfs_folio_traces),
+ __entry->ra_trigger ? " *RA*" : "")
);
TRACE_EVENT(netfs_write_iter,