Skip to content

Commit 3becdd4

Browse files
author
Kent Overstreet
committed
bcachefs: Improve sysfs internal/btree_updates
Print out the function that launched the btree update. Signed-off-by: Kent Overstreet <[email protected]>
1 parent a0a466e commit 3becdd4

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

fs/bcachefs/btree_update_interior.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,7 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,
11171117
closure_init(&as->cl, NULL);
11181118
as->c = c;
11191119
as->start_time = start_time;
1120+
as->ip_started = _RET_IP_;
11201121
as->mode = BTREE_INTERIOR_NO_UPDATE;
11211122
as->took_gc_lock = true;
11221123
as->btree_id = path->btree_id;
@@ -2441,12 +2442,12 @@ void bch2_btree_updates_to_text(struct printbuf *out, struct bch_fs *c)
24412442

24422443
mutex_lock(&c->btree_interior_update_lock);
24432444
list_for_each_entry(as, &c->btree_interior_update_list, list)
2444-
prt_printf(out, "%p m %u w %u r %u j %llu\n",
2445-
as,
2446-
as->mode,
2447-
as->nodes_written,
2448-
closure_nr_remaining(&as->cl),
2449-
as->journal.seq);
2445+
prt_printf(out, "%ps: mode=%u nodes_written=%u cl.remaining=%u journal_seq=%llu\n",
2446+
(void *) as->ip_started,
2447+
as->mode,
2448+
as->nodes_written,
2449+
closure_nr_remaining(&as->cl),
2450+
as->journal.seq);
24502451
mutex_unlock(&c->btree_interior_update_lock);
24512452
}
24522453

fs/bcachefs/btree_update_interior.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ struct btree_update {
3232
struct closure cl;
3333
struct bch_fs *c;
3434
u64 start_time;
35+
unsigned long ip_started;
3536

3637
struct list_head list;
3738
struct list_head unwritten_list;

0 commit comments

Comments
 (0)