Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
librbd/cache/pwl: solve the problem of calc m_bytes_allocated when re…
…load entries. Currently, it will load existing entries after restart and cacl m_bytes_allocated based on those entries. But currently there are the following problems: 1: The allocated of write-same is not calculated for rwl & ssd cache. 2: for ssd cache, it not include the size of log-entry itself and don't consider data alignment. This will cause less calculation and more allocatation later. And will overwrite the data which don't flush to osd and make data lost. The calculation methods of ssd and rwl are different. So add new api allocated_and_cached_data() to implement their own method. For SSD cache, we dirtly use m_first_valid_entry & m_first_free_entry to calc m_bytes_allocated. Fixes:https://tracker.ceph.com/issues/52341 Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
- Loading branch information
1 parent
980cf67
commit a96ca93
Showing
6 changed files
with
37 additions
and
15 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