8 Star 0 Fork 5

src-anolis-os/glusterfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0477-glusterd-snapshot-Snapshot-prevalidation-failure-not.patch 1.88 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2021-06-16 16:09 . update to glusterfs-6.0-49.1.el8.src.rpm
From 3d50207b346cb5d95af94aa010ebd1ec3e795554 Mon Sep 17 00:00:00 2001
From: srijan-sivakumar <[email protected]>
Date: Wed, 4 Nov 2020 11:44:51 +0530
Subject: [PATCH 477/478] glusterd/snapshot: Snapshot prevalidation failure not
failing.
The value of `ret` is to be set to `-1` to indicate failure
or else the prevalidation which is supposed to be a failure
as the snapshot isn't even activated for cloning will move
to next stage.
Label: DOWNSTREAM ONLY
BUG: 1837926
Change-Id: I95122c3a261332630efa00033a1892a8f95fc00b
Signed-off-by: srijan-sivakumar <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/216920
Tested-by: RHGS Build Bot <[email protected]>
Reviewed-by: Shwetha Acharya <[email protected]>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <[email protected]>
---
xlators/mgmt/glusterd/src/glusterd-snapshot.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 5b8ae97..ee3cea0 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -2298,8 +2298,8 @@ glusterd_snapshot_clone_prevalidate(dict_t *dict, char **op_errstr,
goto out;
}
-
if (!glusterd_is_volume_started(snap_vol)) {
+ ret = -1;
snprintf(err_str, sizeof(err_str),
"Snapshot %s is "
"not activated",
@@ -9361,7 +9361,8 @@ glusterd_handle_snapshot_fn(rpcsvc_request_t *req)
"for a snapshot");
op_errno = EG_OPNOTSUP;
gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_UNSUPPORTED_VERSION,
- "%s (%d < %d)", err_str, conf->op_version, GD_OP_VERSION_RHS_3_0);
+ "%s (%d < %d)", err_str, conf->op_version,
+ GD_OP_VERSION_RHS_3_0);
ret = -1;
goto out;
}
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/glusterfs.git
[email protected]:src-anolis-os/glusterfs.git
src-anolis-os
glusterfs
glusterfs
a8

搜索帮助