Skip to content

Commit 7f253ce

Browse files
committed
crimson/os/seastore: cache metadata during trimming to prevent from disk read
I encountered continous disk reads during trimming even though there are sufficient cache available, in 4K random write test with RBM (RBD). This is because metadata is note cached if its source is background transaction within touch_extent(). So, seastore, including the trimming process, needs to constantly retrieve metadata (e.g., BACKREF_LEAF). Signed-off-by: Myoungwon Oh <[email protected]>
1 parent 3e76b89 commit 7f253ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/crimson/os/seastore/cache.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1342,8 +1342,11 @@ class Cache {
13421342
CachedExtent &ext,
13431343
const Transaction::src_t* p_src=nullptr)
13441344
{
1345-
if (p_src && is_background_transaction(*p_src))
1345+
if (p_src &&
1346+
is_background_transaction(*p_src) &&
1347+
is_logical_type(ext.get_type())) {
13461348
return;
1349+
}
13471350
if (ext.is_stable_clean() && !ext.is_placeholder()) {
13481351
lru.move_to_top(ext);
13491352
}

0 commit comments

Comments
 (0)