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

Implementation of fuse lowlevel, ls cd mkdir rmdir. #849

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ibwroot
Copy link
Contributor

@ibwroot ibwroot commented Feb 12, 2017

No description provided.


static int reply_buf_limited(fuse_req_t req, const char *buf, size_t bufsize,
off_t off, size_t maxsize) {
if (bufsize - off > 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码风格

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

bool NameSpace::DeleteFileInfo(const std::string file_key, NameServerLog* log) {
int64_t entry_id;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

放到使用时再声明吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@@ -258,6 +315,8 @@ StatusCode NameSpace::BuildPath(const std::string& path, FileInfo* file_info, st
LOG(INFO, "path split fail %s", path.c_str());
return kBadParameter;
}
LOG(INFO, "path split %s", path.c_str());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

缩进好像有问题

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@@ -258,6 +315,8 @@ StatusCode NameSpace::BuildPath(const std::string& path, FileInfo* file_info, st
LOG(INFO, "path split fail %s", path.c_str());
return kBadParameter;
}
LOG(INFO, "path split %s", path.c_str());
LOG(INFO, "path[0] %s", paths[0].c_str());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥单独把path[0]打出来

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK 这一行忘了删掉了

s = db_i->Write(leveldb::WriteOptions(), &batch);
if (!s.ok()) {
LOG(INFO, "Unlink dentry fail: %s\n", dir_info.name().c_str());
LOG(FATAL, "Namespace write to db_i fail!");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥连着打两行

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

src/sdk/bfs.h Outdated
@@ -78,6 +78,7 @@ class File {
};

struct BfsFileInfo {
uint64_t ino;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

接口里都是用的int64_t

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对,这个地方我想把proto fileinfo entry_id,及namespace的有关接口统一改成uint64_t,因为fuse lowlevel端的ino参数的类型是unsigned long

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants