Lines Matching defs:wdata

4758 	struct cifs_io_subrequest *wdata = mid->callback_data;
4759 struct cifs_tcon *tcon = tlink_tcon(wdata->req->cfile->tlink);
4760 struct TCP_Server_Info *server = wdata->server;
4766 WARN_ONCE(wdata->server != mid->server,
4767 "wdata server %p != mid server %p",
4768 wdata->server, mid->server);
4785 if (written > wdata->subreq.len)
4788 if (written < wdata->subreq.len)
4789 wdata->result = -ENOSPC;
4791 wdata->subreq.len = written;
4792 iov_iter_advance(&wdata->subreq.io_iter, written);
4808 * If this wdata has a memory registered, the MR can be freed
4814 if (wdata->mr) {
4815 smbd_deregister_mr(wdata->mr);
4816 wdata->mr = NULL;
4821 trace_smb3_write_err(wdata->xid,
4822 wdata->req->cfile->fid.persistent_fid,
4823 tcon->tid, tcon->ses->Suid, wdata->subreq.start,
4824 wdata->subreq.len, wdata->result);
4825 if (wdata->result == -ENOSPC)
4830 wdata->req->cfile->fid.persistent_fid,
4832 wdata->subreq.start, wdata->subreq.len);
4834 wdata->credits.value = 0;
4835 cifs_write_subrequest_terminated(wdata, result ?: written, true);
4842 smb2_async_writev(struct cifs_io_subrequest *wdata)
4847 struct cifs_tcon *tcon = tlink_tcon(wdata->req->cfile->tlink);
4848 struct TCP_Server_Info *server = wdata->server;
4851 unsigned int total_len, xid = wdata->xid;
4856 if (!wdata->server || test_bit(NETFS_SREQ_RETRYING, &wdata->subreq.flags))
4857 server = wdata->server = cifs_pick_channel(tcon->ses);
4866 .offset = wdata->subreq.start,
4867 .length = wdata->subreq.len,
4868 .persistent_fid = wdata->req->cfile->fid.persistent_fid,
4869 .volatile_fid = wdata->req->cfile->fid.volatile_fid,
4870 .pid = wdata->pid,
4895 trace_smb3_write_enter(wdata->xid,
4909 size_t data_size = iov_iter_count(&wdata->subreq.io_iter);
4912 wdata->mr = smbd_register_mr(server->smbd_conn, &wdata->subreq.io_iter,
4914 if (!wdata->mr) {
4929 v1->offset = cpu_to_le64(wdata->mr->mr->iova);
4930 v1->token = cpu_to_le32(wdata->mr->mr->rkey);
4931 v1->length = cpu_to_le32(wdata->mr->mr->length);
4939 rqst.rq_iter = wdata->subreq.io_iter;
4941 if (test_bit(NETFS_SREQ_RETRYING, &wdata->subreq.flags))
4944 if (wdata->mr)
4952 if (!wdata->mr)
4958 if (wdata->credits.value > 0) {
4959 shdr->CreditCharge = cpu_to_le16(DIV_ROUND_UP(wdata->subreq.len,
4969 rc = adjust_credits(server, &wdata->credits, io_parms->length);
4977 wdata, flags, &wdata->credits);
4978 /* Can't touch wdata if rc == 0 */
4994 add_credits_and_wake_if(wdata->server, &wdata->credits, 0);
4995 cifs_write_subrequest_terminated(wdata, rc, true);