mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-11 20:05:22 +02:00
cifs: set replay flag for retries of write command
[ Upstream commit 4cdad80261
]
Similar to the rest of the commands, this is a change
to add replay flags on retry. This one does not add a
back-off, considering that we may want to flush a write
ASAP to the server. Considering that this will be a
flush of cached pages, the retrans value is also not
honoured.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
433042a91f
commit
cdd7870a5f
|
@ -1515,6 +1515,7 @@ struct cifs_writedata {
|
||||||
struct smbd_mr *mr;
|
struct smbd_mr *mr;
|
||||||
#endif
|
#endif
|
||||||
struct cifs_credits credits;
|
struct cifs_credits credits;
|
||||||
|
bool replay;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -3413,6 +3413,7 @@ cifs_resend_wdata(struct cifs_writedata *wdata, struct list_head *wdata_list,
|
||||||
if (wdata->cfile->invalidHandle)
|
if (wdata->cfile->invalidHandle)
|
||||||
rc = -EAGAIN;
|
rc = -EAGAIN;
|
||||||
else {
|
else {
|
||||||
|
wdata->replay = true;
|
||||||
#ifdef CONFIG_CIFS_SMB_DIRECT
|
#ifdef CONFIG_CIFS_SMB_DIRECT
|
||||||
if (wdata->mr) {
|
if (wdata->mr) {
|
||||||
wdata->mr->need_invalidate = true;
|
wdata->mr->need_invalidate = true;
|
||||||
|
|
|
@ -4801,7 +4801,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
|
||||||
struct cifs_io_parms *io_parms = NULL;
|
struct cifs_io_parms *io_parms = NULL;
|
||||||
int credit_request;
|
int credit_request;
|
||||||
|
|
||||||
if (!wdata->server)
|
if (!wdata->server || wdata->replay)
|
||||||
server = wdata->server = cifs_pick_channel(tcon->ses);
|
server = wdata->server = cifs_pick_channel(tcon->ses);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4886,6 +4886,8 @@ smb2_async_writev(struct cifs_writedata *wdata,
|
||||||
rqst.rq_nvec = 1;
|
rqst.rq_nvec = 1;
|
||||||
rqst.rq_iter = wdata->iter;
|
rqst.rq_iter = wdata->iter;
|
||||||
rqst.rq_iter_size = iov_iter_count(&rqst.rq_iter);
|
rqst.rq_iter_size = iov_iter_count(&rqst.rq_iter);
|
||||||
|
if (wdata->replay)
|
||||||
|
smb2_set_replay(server, &rqst);
|
||||||
#ifdef CONFIG_CIFS_SMB_DIRECT
|
#ifdef CONFIG_CIFS_SMB_DIRECT
|
||||||
if (wdata->mr)
|
if (wdata->mr)
|
||||||
iov[0].iov_len += sizeof(struct smbd_buffer_descriptor_v1);
|
iov[0].iov_len += sizeof(struct smbd_buffer_descriptor_v1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user