From 4921655e234b27a2f2e6b9ddd61c0478e25e8f12 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 7 Sep 2021 16:01:23 -0700 Subject: [PATCH] crimson/os/seastore/.../lba_btree: clarify handle_split, find_insertion comments Signed-off-by: Samuel Just --- .../os/seastore/lba_manager/btree/lba_btree.h | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/crimson/os/seastore/lba_manager/btree/lba_btree.h b/src/crimson/os/seastore/lba_manager/btree/lba_btree.h index a822b6dde0413..0bc13f78155ac 100644 --- a/src/crimson/os/seastore/lba_manager/btree/lba_btree.h +++ b/src/crimson/os/seastore/lba_manager/btree/lba_btree.h @@ -566,6 +566,17 @@ private: }); } + /** + * handle_split + * + * Prepare iter for insertion. iter should begin pointing at + * the valid insertion point (lower_bound(laddr)). + * + * Upon completion, iter will point at the + * position at which laddr should be inserted. iter may, upon completion, + * point at the end of a leaf other than the end leaf if that's the correct + * insertion point. + */ using find_insertion_iertr = base_iertr; using find_insertion_ret = find_insertion_iertr::future<>; static find_insertion_ret find_insertion( @@ -573,6 +584,16 @@ private: laddr_t laddr, iterator &iter); + /** + * handle_split + * + * Split nodes in iter as needed for insertion. First, scan iter from leaf + * to find first non-full level. Then, split from there towards leaf. + * + * Upon completion, iter will point at the newly split insertion point. As + * with find_insertion, iter's leaf pointer may be end without iter being + * end. + */ using handle_split_iertr = base_iertr; using handle_split_ret = handle_split_iertr::future<>; handle_split_ret handle_split( -- 2.39.5