提交 cd4f26ed 编写于 作者: T Trond Myklebust 提交者: Zheng Zengkai

pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE

stable inclusion
from stable-v5.10.124
commit 03ea83324aa0c42139ca430e4b2e291e87018f39
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6E7

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

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

[ Upstream commit fe44fb23 ]

If the server tells us that a pNFS layout is not available for a
specific file, then we should not keep pounding it with further
layoutget requests.

Fixes: 183d9e7b ("pnfs: rework LAYOUTGET retry handling")
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 6564cac6
...@@ -2155,6 +2155,12 @@ pnfs_update_layout(struct inode *ino, ...@@ -2155,6 +2155,12 @@ pnfs_update_layout(struct inode *ino,
case -ERECALLCONFLICT: case -ERECALLCONFLICT:
case -EAGAIN: case -EAGAIN:
break; break;
case -ENODATA:
/* The server returned NFS4ERR_LAYOUTUNAVAILABLE */
pnfs_layout_set_fail_bit(
lo, pnfs_iomode_to_fail_bit(iomode));
lseg = NULL;
goto out_put_layout_hdr;
default: default:
if (!nfs_error_is_fatal(PTR_ERR(lseg))) { if (!nfs_error_is_fatal(PTR_ERR(lseg))) {
pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode)); pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册