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
krbd mode for librbd_fsx #1766
Merged
Merged
krbd mode for librbd_fsx #1766
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update usage to include all options and flags. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Move prterrcode() and simple_err() so that all printing functions are close together. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
temp_buf is used for reads, so align it by readbdy. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Use posix_memalign() to allocate good_buf and temp_buf, which must be writebdy and readbdy aligned respectively. Using round_ptr_up() the way it is used makes fsx crash on free()s at the end of main(), because the pointer returned by malloc() is overwritten by the aligned pointer. Drop round_ptr_up() as it is no longer used. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
In preparation for krbd mode support, change check_trunc_hack() to resize to a sector-size aligned value. The kernel will not work with images whose size is not sector-size aligned. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
In preparation for krbd mode support, provide an option to specify alignment for discards. The kernel will reject discard requests whose offset and length are not sector-size aligned. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
In preparation for krbd mode support, introduce an option to disable randomized striping. The kernel as of 3.15 does not support "fancy" striping and will not map images with non-default striping values. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Add krbd mode support (-K) to test krbd in the same way librbd is tested. This introduces a dependency on libkrbd and, because it's a C++ static library, requires C++ linking. The rbd_operations framework can be extended in the future to also test rbd_fuse. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
docloseopen() always opens $iname image. This is bad, because the image we had opened could have been something like $iname-clone3. Fix it by leveraging the fact that rbd_ctx has an image name field. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Wire up O_DIRECT mode (-Z) for krbd, to have a workaround for possible problems with BLKDISCARD leaving stale entries in the buffer cache in place. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
check_clone() allocates temporary good_buf and temp_buf with malloc(), which is not good enough for krbd with O_DIRECT. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Pushed fixes and direct IO mode for krbd. |
jdurgin
added a commit
that referenced
this pull request
May 8, 2014
krbd mode for librbd_fsx Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.