8 Star 0 Fork 5

src-anolis-os/glusterfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0168-cluster-dht-Fix-directory-perms-during-selfheal.patch 1.88 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import glusterfs-6.0-20.el8.src.rpm
From 6198461bce7d264b71fe91e981aa3af3a19a8abe Mon Sep 17 00:00:00 2001
From: N Balachandran <[email protected]>
Date: Tue, 4 Jun 2019 14:51:44 +0530
Subject: [PATCH 168/169] cluster/dht: Fix directory perms during selfheal
Fixed a bug in the revalidate code path that wiped out
directory permissions if no mds subvol was found.
upstream: https://review.gluster.org/#/c/glusterfs/+/22813/
> Change-Id: I8b4239ffee7001493c59d4032a2d3062586ea115
> fixes: bz#1716830
> Signed-off-by: N Balachandran <[email protected]>
BUG: 1716821
Change-Id: I6d84d381d07a27d1ef9113a2104a62ceaf2110e3
Signed-off-by: N Balachandran <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/172622
Tested-by: RHGS Build Bot <[email protected]>
Reviewed-by: Mohit Agrawal <[email protected]>
---
xlators/cluster/dht/src/dht-common.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 183872f..e1edb38 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -1739,9 +1739,11 @@ unlock:
if (dht_needs_selfheal(frame, this)) {
if (!__is_root_gfid(local->loc.inode->gfid)) {
- local->stbuf.ia_gid = local->mds_stbuf.ia_gid;
- local->stbuf.ia_uid = local->mds_stbuf.ia_uid;
- local->stbuf.ia_prot = local->mds_stbuf.ia_prot;
+ if (local->mds_subvol) {
+ local->stbuf.ia_gid = local->mds_stbuf.ia_gid;
+ local->stbuf.ia_uid = local->mds_stbuf.ia_uid;
+ local->stbuf.ia_prot = local->mds_stbuf.ia_prot;
+ }
} else {
local->stbuf.ia_gid = local->prebuf.ia_gid;
local->stbuf.ia_uid = local->prebuf.ia_uid;
--
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

搜索帮助