Skip to content

Commit

Permalink
zcachedb dump merge_progress (openzfs#127)
Browse files Browse the repository at this point in the history
Extend zcachedb dump-structures to include the index and operation log from the in-progress merge state.
  • Loading branch information
ahrens authored Jan 21, 2022
1 parent 0f7b60b commit 204c3d0
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion cmd/zfs_object_agent/zettacache/src/zettacache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,15 @@ impl ZCacheDBHandle {
println!("{:#?}", chunk);
})
.await;
if let Some(mpp) = &self.checkpoint.merge_progress {
println!("\nold operation log from MergeProgressPhys:");
mpp.operation_log
.iter_chunks(self.block_access.clone())
.for_each(|chunk| async move {
println!("{:#?}", chunk);
})
.await;
}
}

if opts.dump_index_log_raw {
Expand All @@ -1828,7 +1837,23 @@ impl ZCacheDBHandle {
.for_each(|chunk| async move {
println!("{:#?}", chunk);
})
.await
.await;

if let Some(mpp) = &self.checkpoint.merge_progress {
println!("\nnew index from MergeProgressPhys:");
mpp.index
.iter_log_chunks(self.block_access.clone())
.for_each(|chunk| async move {
println!("{:#?}", chunk);
})
.await;
mpp.index
.iter_log_summary(self.block_access.clone())
.for_each(|chunk| async move {
println!("{:#?}", chunk);
})
.await;
}
}

if opts.dump_rebalance_log_raw {
Expand Down

0 comments on commit 204c3d0

Please sign in to comment.