Project

General

Profile

Documentation #55462

clarify the meaning of the code in do_replay_recovery_read

Added by Yizheng Jiao almost 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

I spent some time to understand the function do_replay_recovery_read in BlueFS.cc. Most parts of the code make sense to me.
However, I am not sure what is the meaning of the line below.

https://github.com/ceph/ceph/blob/a32221cb9a00c40a0c783eaf8296e5bb513b4c83/src/os/bluestore/BlueFS.cc#L4204

In my understanding, the beginning page of the `raw_data` is 0.
According to the code, we have this equation `search_b = chunk_b - overlay_size = raw_data + page_size (4096) - overlay_size (48)`.
Therefore, the first 48 bytes of `search_b` are 0es. I am wondering why this is necessary or how it can be useful for any cases.
Please help me out.

I am happy to contribute changes to make this function more understandable after I get a better grasp of it.

Also available in: Atom PDF