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

Make sure OMAP's get_state() reads the entire file, even if it has more than 1024 keys #272

Merged
merged 1 commit into from
Oct 22, 2023

Conversation

gbregman
Copy link
Contributor

@gbregman gbregman commented Oct 19, 2023

Fixes #263
Fixes #266

The OMAP get_state() function only reads 1024 values from the OMAP file. When I had an OMAP file which was 3000 lines long I got an exception the the omap_version key wasn't found. Adding some debug messages I found out that the dictionary created from the values we read from the OMAP file was 1024 big and not 3000. So, even though we pass -1 to get_omap_vals() we only read 1024 lines from the file. We need to enclose this code in a loop and keep on reading from the OMAP until we read the entire file.

@gbregman gbregman requested review from leonidc and caroav October 19, 2023 15:22
@gbregman gbregman force-pushed the devel branch 3 times, most recently from be8ee94 to 4b4b97e Compare October 19, 2023 20:15
@gbregman gbregman merged commit 4d74dcf into ceph:devel Oct 22, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants