8 Star 0 Fork 5

src-anolis-os/glusterfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0133-glusterd-enable-fips-mode-rchecksum-for-new-volumes.patch 2.30 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import glusterfs-6.0-20.el8.src.rpm
From f1f27e5839dd99389bef65f79ea491e98e6935d2 Mon Sep 17 00:00:00 2001
From: Ravishankar N <[email protected]>
Date: Tue, 23 Apr 2019 18:05:36 +0530
Subject: [PATCH 133/141] glusterd: enable fips-mode-rchecksum for new volumes
...during volume create if the cluster op-version is >=GD_OP_VERSION_7_0.
This option itself was introduced in GD_OP_VERSION_4_0_0 via commit 6daa65356.
We missed enabling it by default for new volume creates in that commit.
If we are to do it now safely, we need to use op version
GD_OP_VERSION_7_0 and target it for release-7.
Patch in upstream master: https://review.gluster.org/#/c/glusterfs/+/22609/
BUG: 1706683
Change-Id: I7c6d4a8abe0816367e7069cb5cad01744f04858f
fixes: bz#1706683
Signed-off-by: Ravishankar N <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/169443
Reviewed-by: Atin Mukherjee <[email protected]>
Tested-by: RHGS Build Bot <[email protected]>
---
xlators/mgmt/glusterd/src/glusterd-volgen.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index da877aa..77aa705 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -1614,10 +1614,17 @@ brick_graph_add_posix(volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
gf_boolean_t pgfid_feat = _gf_false;
char *value = NULL;
xlator_t *xl = NULL;
+ xlator_t *this = NULL;
+ glusterd_conf_t *priv = NULL;
if (!graph || !volinfo || !set_dict || !brickinfo)
goto out;
+ this = THIS;
+ GF_VALIDATE_OR_GOTO("glusterd", this, out);
+ priv = this->private;
+ GF_VALIDATE_OR_GOTO("glusterd", priv, out);
+
ret = glusterd_volinfo_get(volinfo, VKEY_FEATURES_QUOTA, &value);
if (value) {
ret = gf_string2boolean(value, &quota_enabled);
@@ -1661,6 +1668,12 @@ brick_graph_add_posix(volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
}
}
+ if (priv->op_version >= GD_OP_VERSION_7_0) {
+ ret = xlator_set_fixed_option(xl, "fips-mode-rchecksum", "on");
+ if (ret) {
+ goto out;
+ }
+ }
snprintf(tmpstr, sizeof(tmpstr), "%d", brickinfo->fs_share_count);
ret = xlator_set_fixed_option(xl, "shared-brick-count", tmpstr);
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

搜索帮助