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

client supports mounting volumes in different clusters #2542

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

caoxianfei1
Copy link
Contributor

@caoxianfei1 caoxianfei1 commented Jun 20, 2023

What problem does this PR solve?

Issue Number: #xxx

Problem Summary:

What is changed and how it works?

What's Changed:

How it Works:

Side effects(Breaking backward compatibility? Performance regression?):

Check List

  • Relevant documentation/comments is changed or added
  • I acknowledge that all my contributions will be made under the project's license

@caoxianfei1 caoxianfei1 force-pushed the dev/fileopen branch 3 times, most recently from 348d3c0 to c9c118b Compare June 20, 2023 08:44
@@ -60,7 +60,7 @@ class FileNameParser {
* @param[in] fileName
* @return 解析出的字符串: "/cinder/volume-6f30d296-07f7-452e-a983-513191f8cd95_cinder_" //NOLINT
*/
static std::string Parse(const std::string& fileName);
static std::pair<std::string,std::string> Parse(const std::string& fileName);
Copy link
Contributor

Choose a reason for hiding this comment

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

modify the code comment and show the format after this update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@@ -219,8 +219,22 @@ void FileClient::UnInit() {
int FileClient::Open(const std::string &filename, const UserInfo_t &userinfo,
const OpenFlags &openflags) {
LOG(INFO) << "Opening filename: " << filename << ", flags: " << openflags;
ClientConfig clientconfig;
Copy link
Contributor

Choose a reason for hiding this comment

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

chaneg clientconfig to clientConfig

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

* @param: finfo是出参,携带当前文件的基础信息
* @return: 成功返回int::OK,否则返回小于0的错误码
*/
virtual int StatFile(int fd, FileStatInfo* finfo);
Copy link
Contributor

Choose a reason for hiding this comment

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

change to English

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -294,6 +302,8 @@ class FileClient {
}

private:
void BuildFileStatInfo(FInfo_t fi, FileStatInfo *finfo);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
void BuildFileStatInfo(FInfo_t fi, FileStatInfo *finfo);
static void BuildFileStatInfo(const FInfo& fi, FileStatInfo *finfo);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -34,50 +34,53 @@ using ::curve::client::UserInfo_t;
const char* kSessionAttrKey = "session";
const char* kOpenFlagsAttrKey = "openflags";

curve::client::OpenFlags ConverToCurveOpenFlags(const OpenFlags* flags) {
curve::client::OpenFlags ConverToCurveOpenFlags(const OpenFlags* flags, const std::string& confPath) {
Copy link
Contributor

Choose a reason for hiding this comment

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

column limit is 80

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

return curveflags;
}
}

std::string FileNameParser::Parse(const std::string& fileName) {
std::pair<std::string, std::string> FileNameParser::Parse(const std::string& fileName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@caoxianfei1
Copy link
Contributor Author

cicheck

1 similar comment
@caoxianfei1
Copy link
Contributor Author

cicheck

@caoxianfei1 caoxianfei1 force-pushed the dev/fileopen branch 2 times, most recently from 47f9659 to c2e2ebe Compare June 26, 2023 08:51
@caoxianfei1
Copy link
Contributor Author

cicheck

@caoxianfei1 caoxianfei1 force-pushed the dev/fileopen branch 3 times, most recently from 1c9672f to e874bed Compare June 27, 2023 05:57
@caoxianfei1
Copy link
Contributor Author

cicheck

@caoxianfei1 caoxianfei1 force-pushed the dev/fileopen branch 2 times, most recently from a3c69cf to 89a25fd Compare June 27, 2023 07:59
@caoxianfei1
Copy link
Contributor Author

cicheck

2 similar comments
@caoxianfei1
Copy link
Contributor Author

cicheck

@caoxianfei1
Copy link
Contributor Author

cicheck

@caoxianfei1
Copy link
Contributor Author

cicheck

@caoxianfei1
Copy link
Contributor Author

cicheck

1 similar comment
@caoxianfei1
Copy link
Contributor Author

cicheck

@caoxianfei1 caoxianfei1 force-pushed the dev/fileopen branch 2 times, most recently from 1d2aa58 to 3fef782 Compare June 28, 2023 06:30
@caoxianfei1
Copy link
Contributor Author

cicheck

Signed-off-by: caoxianfei1 <caoxianfei@corp.netease.com>
@caoxianfei1
Copy link
Contributor Author

cicheck

@caoxianfei1 caoxianfei1 merged commit 8db6942 into opencurve:master Jun 30, 2023
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.

3 participants