Commit c775abc9 authored by David Howells's avatar David Howells Committed by Jialin Zhang
Browse files

afs: Use the operation issue time instead of the reply time for callbacks

stable inclusion
from stable-v5.10.143
commit 63677a09238a0891521132f59d14668e3722e73f
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0U6

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=63677a09238a0891521132f59d14668e3722e73f



--------------------------------

[ Upstream commit 7903192c ]

rxrpc and kafs between them try to use the receive timestamp on the first
data packet (ie. the one with sequence number 1) as a base from which to
calculate the time at which callback promise and lock expiration occurs.

However, we don't know how long it took for the server to send us the reply
from it having completed the basic part of the operation - it might then,
for instance, have to send a bunch of a callback breaks, depending on the
particular operation.

Fix this by using the time at which the operation is issued on the client
as a base instead.  That should never be longer than the server's idea of
the expiry time.

Fixes: 78107055 ("afs: Fix calculation of callback expiry time")
Fixes: 2070a3e4 ("rxrpc: Allow the reply time to be obtained on a client call")
Suggested-by: default avatarJeffrey E Altman <jaltman@auristor.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 288c5660
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment