@@ -1232,6 +1232,15 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,
1232
1232
list_add_tail (& as -> list , & c -> btree_interior_update_list );
1233
1233
mutex_unlock (& c -> btree_interior_update_lock );
1234
1234
1235
+ struct btree * b = btree_path_node (path , path -> level );
1236
+ as -> node_start = b -> data -> min_key ;
1237
+ as -> node_end = b -> data -> max_key ;
1238
+ as -> node_needed_rewrite = btree_node_need_rewrite (b );
1239
+ as -> node_written = b -> written ;
1240
+ as -> node_sectors = btree_buf_bytes (b ) >> 9 ;
1241
+ as -> node_remaining = __bch2_btree_u64s_remaining (b ,
1242
+ btree_bkey_last (b , bset_tree_last (b )));
1243
+
1235
1244
/*
1236
1245
* We don't want to allocate if we're in an error state, that can cause
1237
1246
* deadlock on emergency shutdown due to open buckets getting stuck in
@@ -2108,6 +2117,9 @@ int __bch2_foreground_maybe_merge(struct btree_trans *trans,
2108
2117
if (ret )
2109
2118
goto err ;
2110
2119
2120
+ as -> node_start = prev -> data -> min_key ;
2121
+ as -> node_end = next -> data -> max_key ;
2122
+
2111
2123
trace_and_count (c , btree_node_merge , trans , b );
2112
2124
2113
2125
n = bch2_btree_node_alloc (as , trans , b -> c .level );
@@ -2681,9 +2693,19 @@ static void bch2_btree_update_to_text(struct printbuf *out, struct btree_update
2681
2693
2682
2694
prt_str (out , " " );
2683
2695
bch2_btree_id_to_text (out , as -> btree_id );
2684
- prt_printf (out , " l=%u-%u mode=%s nodes_written=%u cl.remaining=%u journal_seq=%llu\n " ,
2696
+ prt_printf (out , " l=%u-%u " ,
2685
2697
as -> update_level_start ,
2686
- as -> update_level_end ,
2698
+ as -> update_level_end );
2699
+ bch2_bpos_to_text (out , as -> node_start );
2700
+ prt_char (out , ' ' );
2701
+ bch2_bpos_to_text (out , as -> node_end );
2702
+ prt_printf (out , "\nwritten %u/%u u64s_remaining %u need_rewrite %u" ,
2703
+ as -> node_written ,
2704
+ as -> node_sectors ,
2705
+ as -> node_remaining ,
2706
+ as -> node_needed_rewrite );
2707
+
2708
+ prt_printf (out , "\nmode=%s nodes_written=%u cl.remaining=%u journal_seq=%llu\n" ,
2687
2709
bch2_btree_update_modes [as -> mode ],
2688
2710
as -> nodes_written ,
2689
2711
closure_nr_remaining (& as -> cl ),
0 commit comments