bcachefs: bch2_disk_path_to_text() no longer takes sb_lock
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 15:12:14 +0000 (11:12 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 31 Oct 2023 16:18:37 +0000 (12:18 -0400)
commite677179b35b7ecbe3cefe33011b69d45171e5e9f
treeac09673fe202f01873a29f8ce7d23cabe2d780ac
parent37707bb183b4746f27b0beaf0c3273fd7c79dc66
bcachefs: bch2_disk_path_to_text() no longer takes sb_lock

We're going to be using bch2_target_to_text() ->
bch2_disk_path_to_text() from bch2_bkey_ptrs_to_text() and
bch2_bkey_ptrs_invalid(), which can be called in any context.

This patch adds the actual label to bch_disk_group_cpu so that it can be
used by bch2_disk_path_to_text, and splits out bch2_disk_path_to_text()
into two variants - like the previous patch, one for when we have a
running filesystem and another for when we only have a superblock.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/disk_groups.c
fs/bcachefs/disk_groups.h
fs/bcachefs/disk_groups_types.h
fs/bcachefs/super.c
fs/bcachefs/sysfs.c