Lines Matching refs:wdata
4590 struct cifs_writedata *wdata = mid->callback_data; in smb2_writev_callback() local
4591 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); in smb2_writev_callback()
4592 struct TCP_Server_Info *server = wdata->server; in smb2_writev_callback()
4597 WARN_ONCE(wdata->server != mid->server, in smb2_writev_callback()
4599 wdata->server, mid->server); in smb2_writev_callback()
4605 wdata->result = smb2_check_receive(mid, server, 0); in smb2_writev_callback()
4606 if (wdata->result != 0) in smb2_writev_callback()
4616 if (written > wdata->bytes) in smb2_writev_callback()
4619 if (written < wdata->bytes) in smb2_writev_callback()
4620 wdata->result = -ENOSPC; in smb2_writev_callback()
4622 wdata->bytes = written; in smb2_writev_callback()
4626 wdata->result = -EAGAIN; in smb2_writev_callback()
4633 wdata->result = -EIO; in smb2_writev_callback()
4644 if (wdata->mr) { in smb2_writev_callback()
4645 smbd_deregister_mr(wdata->mr); in smb2_writev_callback()
4646 wdata->mr = NULL; in smb2_writev_callback()
4649 if (wdata->result) { in smb2_writev_callback()
4652 wdata->cfile->fid.persistent_fid, in smb2_writev_callback()
4653 tcon->tid, tcon->ses->Suid, wdata->offset, in smb2_writev_callback()
4654 wdata->bytes, wdata->result); in smb2_writev_callback()
4655 if (wdata->result == -ENOSPC) in smb2_writev_callback()
4660 wdata->cfile->fid.persistent_fid, in smb2_writev_callback()
4662 wdata->offset, wdata->bytes); in smb2_writev_callback()
4664 queue_work(cifsiod_wq, &wdata->work); in smb2_writev_callback()
4671 smb2_async_writev(struct cifs_writedata *wdata, in smb2_async_writev() argument
4677 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); in smb2_async_writev()
4678 struct TCP_Server_Info *server = wdata->server; in smb2_async_writev()
4686 if (!wdata->server) in smb2_async_writev()
4687 server = wdata->server = cifs_pick_channel(tcon->ses); in smb2_async_writev()
4696 .offset = wdata->offset, in smb2_async_writev()
4697 .length = wdata->bytes, in smb2_async_writev()
4698 .persistent_fid = wdata->cfile->fid.persistent_fid, in smb2_async_writev()
4699 .volatile_fid = wdata->cfile->fid.volatile_fid, in smb2_async_writev()
4700 .pid = wdata->pid, in smb2_async_writev()
4739 size_t data_size = iov_iter_count(&wdata->iter); in smb2_async_writev()
4742 wdata->mr = smbd_register_mr(server->smbd_conn, &wdata->iter, in smb2_async_writev()
4744 if (!wdata->mr) { in smb2_async_writev()
4759 v1->offset = cpu_to_le64(wdata->mr->mr->iova); in smb2_async_writev()
4760 v1->token = cpu_to_le32(wdata->mr->mr->rkey); in smb2_async_writev()
4761 v1->length = cpu_to_le32(wdata->mr->mr->length); in smb2_async_writev()
4769 rqst.rq_iter = wdata->iter; in smb2_async_writev()
4772 if (wdata->mr) in smb2_async_writev()
4780 if (!wdata->mr) in smb2_async_writev()
4786 if (wdata->credits.value > 0) { in smb2_async_writev()
4787 shdr->CreditCharge = cpu_to_le16(DIV_ROUND_UP(wdata->bytes, in smb2_async_writev()
4797 rc = adjust_credits(server, &wdata->credits, io_parms->length); in smb2_async_writev()
4804 kref_get(&wdata->refcount); in smb2_async_writev()
4806 wdata, flags, &wdata->credits); in smb2_async_writev()
4816 kref_put(&wdata->refcount, release); in smb2_async_writev()