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

nbd: fix concurrent nbd map #302

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

wu-hanqing
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #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

nbd/src/util.cpp Outdated
}
}

int map_on_nbd_device_by_devpath(int sockfd, const std::string& devpath,
Copy link
Member

Choose a reason for hiding this comment

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

This function can be reused by the above function through some adjustments

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

nbd/src/util.cpp Outdated
@@ -441,6 +393,74 @@ int load_module(NBDConfig *cfg) {
return ret;
}

int map_on_unused_nbd_device(int sockfd, std::string* devpath, int* nbdindex) {
Copy link
Member

Choose a reason for hiding this comment

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

This function can be protect function in the parent class ’NBDController' ?

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

@wu-hanqing wu-hanqing force-pushed the fix-nbd-concurrent-map branch from 0c5f459 to 2e9f178 Compare March 29, 2021 02:26
@xu-chaojie xu-chaojie merged commit 8554b8b into opencurve:master Mar 29, 2021
@wu-hanqing wu-hanqing deleted the fix-nbd-concurrent-map branch March 29, 2021 08:52
@wu-hanqing wu-hanqing mentioned this pull request Jul 20, 2021
2 tasks
ilixiaocui pushed a commit to ilixiaocui/curve that referenced this pull request Feb 6, 2023
thanos: Selected Students for Community Bridge Q3-Q4
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