1 Star 0 Fork 25

oooook/nfs-utils

forked from src-openEuler/nfs-utils 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0003-export-fix-handling-of-error-from-match_fsid.patch 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
wguanghao 提交于 2024-01-10 09:57 . upgrade version to 2.6.3
From 92a0f7d3cc7fc1206e0a763ab737f797b8946ca7 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.de>
Date: Wed, 25 Oct 2023 12:34:45 -0400
Subject: [PATCH] export: fix handling of error from match_fsid()
If match_fsid() returns -1 we shouldn't assume that the path definitely
doesn't match the fsid, though it might not.
This is a similar situation to where an export is expected to be a mount
point, but is found not to be one. So it can be handled the same way,
by setting 'dev_missing'.
This will only have an effect if no other path matched the fsid, which
is what we want.
The current code results in nothing being exported if any export point,
or any mount point beneath a crossmnt export point, fails a 'stat'
request, which is too harsh.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
support/export/cache.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/support/export/cache.c b/support/export/cache.c
index 19bbba5..e459502 100644
--- a/support/export/cache.c
+++ b/support/export/cache.c
@@ -858,7 +858,8 @@ static void nfsd_fh(int f)
case 0:
continue;
case -1:
- goto out;
+ dev_missing ++;
+ continue;
}
if (is_ipaddr_client(dom)
&& !ipaddr_client_matches(exp, ai))
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qu_industry/nfs-utils.git
git@gitee.com:qu_industry/nfs-utils.git
qu_industry
nfs-utils
nfs-utils
master

搜索帮助