Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
librbd: change diff_iterate interface to be more C-friendly
Use int instead of bool for the callback, and make it represent whether the data exists, rather than the opposite, since callers are likely to test for whether it's data instead of whether its zeroes. Change the return value to 0, since an int64_t will wrap around for large reads, and there's no value in reporting the length read when it will always be the length requested clipped to the size of the image. Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
- Loading branch information
Showing
6 changed files
with
51 additions
and
39 deletions.
There are no files selected for viewing
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
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
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
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
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
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