Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curvefs/client: fixed some minor bugs. #2522

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions curvefs/conf/client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ fuseClient.throttle.burstReadIopsSecs=180
#### filesystem metadata
# {
# fs.disableXattr:
# if you want to get curvefs specified xattr,
# you can mount another fs with |fs.disableXattr| is true
# if you want to get better metadata performance,
# you can mount fs with |fs.disableXattr| is true
#
# fs.lookupCache.negativeTimeoutSec:
# entry which not found will be cached if |timeout| > 0
fs.cto=true
fs.maxNameLength=255
fs.disableXattr=true
fs.disableXattr=false
fs.accessLogging=true
fs.kernelCache.attrTimeoutSec=3600
fs.kernelCache.dirAttrTimeoutSec=3600
Expand Down
4 changes: 3 additions & 1 deletion curvefs/src/client/filesystem/rpc_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ CURVEFS_ERROR RPCClient::ReadDir(Ino ino,
continue;
}

// NOTE: we can't use std::move() for attribute for hard link
// which will sharing inode attribute.
dirEntry.ino = ino;
dirEntry.name = std::move(dentry.name());
dirEntry.attr = std::move(iter->second);
dirEntry.attr = iter->second;
(*entries)->Add(dirEntry);
}
return CURVEFS_ERROR::OK;
Expand Down
6 changes: 2 additions & 4 deletions curvefs/src/client/fuse_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ CURVEFS_ERROR FuseClient::FuseOpInit(void *userdata,
struct fuse_conn_info *conn) {
(void)userdata;
(void)conn;
fs_->Run();
return CURVEFS_ERROR::OK;
}

Expand Down Expand Up @@ -368,10 +369,7 @@ CURVEFS_ERROR FuseClient::UpdateParentMCTimeAndNlink(
if (option_.fileSystemOption.deferSyncOption.deferDirMtime) {
inodeManager_->ShipToFlush(parentInodeWrapper);
} else {
ret = parentInodeWrapper->SyncAttr();
if (ret != CURVEFS_ERROR::OK) {
return CURVEFS_ERROR::OK;
}
return parentInodeWrapper->SyncAttr();
}
}

Expand Down
2 changes: 2 additions & 0 deletions curvefs/test/client/test_fuse_volume_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ TEST_F(TestFuseVolumeClient, FuseOpInit_when_fs_exist) {

ASSERT_EQ(fsInfo->fsid(), fsInfoExp.fsid());
ASSERT_EQ(fsInfo->fsname(), fsInfoExp.fsname());

client_->GetFileSystem()->Destory();
}

TEST_F(TestFuseVolumeClient, FuseOpDestroy) {
Expand Down