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

PWX-35452: Fix mount/unmount race by using MountsInProgress to track … #2392

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

pnookala-px
Copy link
Contributor

…mounts that are in progress

What this PR does / why we need it:
There is a race condition between Mount and Unmount and the map that tracks the mounted devices can be removed from the mount even as mounts are in progress. This will result in threads that are trying to mount/unmount further hang or fail.

Which issue(s) this PR fixes (optional)
Closes #
or
PWX-35452

Testing Notes
Testing in Progress.

Copy link
Contributor

@adityadani adityadani left a comment

Choose a reason for hiding this comment

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

It feels a bit weird to use a different lock than the one inside info object to guard the MountsInProgress counter. But this way it reduces the scope of this look and avoid simultaneous mount and unmount request to happen.

@pnookala-px pnookala-px merged commit b9e36c3 into master Dec 20, 2023
2 checks passed
pnookala-px added a commit that referenced this pull request Dec 20, 2023
pnookala-px added a commit that referenced this pull request Dec 20, 2023
pnookala-px added a commit that referenced this pull request Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants