!27 [sync] PR-25: Fix inode sync error between client and server.
From: @openeuler-sync-bot Reviewed-by: @minknov Signed-off-by: @minknov
This commit is contained in:
commit
9ddf044b53
42
0004-Fix-inode-sync-error-between-client-and-server.patch
Normal file
42
0004-Fix-inode-sync-error-between-client-and-server.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 86c4ef6bc5d845b0c1919ddb80702f2896a75d4f Mon Sep 17 00:00:00 2001
|
||||
From: yangxin <245051644@qq.com>
|
||||
Date: Thu, 15 Dec 2022 10:14:53 +0800
|
||||
Subject: [PATCH 4/4] Fix inode sync error between client and server.
|
||||
|
||||
Signed-off-by: yangxin <245051644@qq.com>
|
||||
---
|
||||
qtfs/qtfs/sb.c | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/qtfs/qtfs/sb.c b/qtfs/qtfs/sb.c
|
||||
index 5fd2c8f..aad153b 100644
|
||||
--- a/qtfs/qtfs/sb.c
|
||||
+++ b/qtfs/qtfs/sb.c
|
||||
@@ -1146,6 +1146,7 @@ int qtfs_getattr(const struct path *path, struct kstat *stat, u32 req_mask, unsi
|
||||
struct qtfs_sock_var_s *pvar = qtfs_conn_get_param();
|
||||
struct qtreq_getattr *req;
|
||||
struct qtrsp_getattr *rsp;
|
||||
+ struct inode *inode = path->dentry->d_inode;
|
||||
int ret;
|
||||
|
||||
if (!pvar) {
|
||||
@@ -1172,8 +1173,14 @@ int qtfs_getattr(const struct path *path, struct kstat *stat, u32 req_mask, unsi
|
||||
return ret;
|
||||
}
|
||||
*stat = rsp->stat;
|
||||
- qtfs_debug("qtfs getattr success:<%s> blksiz:%u size:%lld mode:%o ino:%llu pathino:%lu.\n", req->path, rsp->stat.blksize,
|
||||
- rsp->stat.size, rsp->stat.mode, rsp->stat.ino, path->dentry->d_inode->i_ino);
|
||||
+ qtfs_debug("qtfs getattr success:<%s> blksiz:%u size:%lld mode:%o ino:%llu pathino:%lu. %s\n", req->path, rsp->stat.blksize,
|
||||
+ rsp->stat.size, rsp->stat.mode, rsp->stat.ino, inode->i_ino, rsp->stat.ino != inode->i_ino ? "delete current inode" : "");
|
||||
+ if (inode->i_ino != rsp->stat.ino) {
|
||||
+ if (inode->i_nlink > 0){
|
||||
+ drop_nlink(inode);
|
||||
+ }
|
||||
+ d_invalidate(path->dentry);
|
||||
+ }
|
||||
qtfs_conn_put_param(pvar);
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Name: dpu-utilities
|
||||
Summary: openEuler dpu utilities
|
||||
Version: 1.1
|
||||
Release: 2
|
||||
Release: 3
|
||||
License: GPL-2.0
|
||||
Source: https://gitee.com/openeuler/dpu-utilities/repository/archive/v%{version}.tar.gz
|
||||
ExclusiveOS: linux
|
||||
@ -15,6 +15,7 @@ BuildRequires: golang
|
||||
Patch0: 0001-add-path-put-in-xattr-set.patch
|
||||
Patch1: 0002-Add-drop-link-and-dentry-invalid-in-unlink-and-rmdir.patch
|
||||
Patch2: 0003-enable-rexec-read-net-addr-from-config-file.patch
|
||||
Patch3: 0004-Fix-inode-sync-error-between-client-and-server.patch
|
||||
%description
|
||||
This package contains the software utilities on dpu.
|
||||
|
||||
@ -107,6 +108,8 @@ sed -i '/# product cut_conf/a\dpuos kiwi/minios/cfg_dpuos yes' /opt/imageT
|
||||
sed -i '/<repository_rule>/a\dpuos 1 rpm-dir euler_base' /opt/imageTailor/repos/RepositoryRule.conf
|
||||
|
||||
%changelog
|
||||
* Thu Dec 15 2022 YangXin <245051644@qq.com> 1.1-3
|
||||
- Fix inode sync error between client and server.
|
||||
* Thu Dec 08 2022 YangXin <245051644@qq.com> 1.1-2
|
||||
- Fix error of qtfs and modify rexec to enable reading net addr from file.
|
||||
* Mon Nov 28 2022 Weifeng Su <suweifeng1@huawei.com> 1.1-1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user