-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crimson/osd: Introduce with_head_and_clone_obc()
In continuation to 7ca2690: Now that the head ref is no longer a member of obc, we need a new substitute way to get the head when needed. When loading a clone object, the head object is loaded first (See with_clone_obc). Therefore we can make use of this design to move the loaded head forward to the relevant func (See with_head_and_clone_obc). Usually, we wouldn't need to make use of both the head and the clone obc in the same function. However, SnapTrimObjSubEvent::remove_or_update is an abnormal usage. Note: We want to avoid holding any unneeded references to obcs to allow the obc_registery to evict no longer valid obc. Therefore, with_obc() which references only a single obc is the preferred entry point for loading obcs. Signed-off-by: Matan Breizman <[email protected]>
- Loading branch information
Showing
3 changed files
with
62 additions
and
4 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