lsblk: add bcachefs multi-device mount propagation
Add support for bcachefs multi-device filesystems to show mount points
on all member devices, not just the one listed in mountinfo.
The implementation follows the existing btrfs/ZFS multi-device group
framework in mnt.c:
- Enumerate member devices via /sys/fs/bcachefs/<uuid>/dev-N/block
symlinks (similar to btrfs /sys/fs/btrfs/<uuid>/devices/).
- Cache and propagate mount entries to all group members.
The mountinfo entry caching (previously inlined in the btrfs scanner)
has been refactored into the shared fs_devs_cache_mounts() function
used by both btrfs and bcachefs. The function now also filters
mountinfo entries by filesystem type to avoid unnecessary comparisons
with unrelated mounts.
Additionally, fs_devs_add_filesystem() now skips duplicate entries to
prevent the same mount from being cached multiple times.
Note that bcachefs uses a non-standard colon-separated source format in
mountinfo (e.g. "/dev/sdc1:/dev/sdc2") rather than a single device
path. This format is not recognized by libmount's mnt_fs_streq_srcpath(),
so an extra is_source_member() helper is used to match individual
device paths within the compound source string.
Addresses: https://github.com/util-linux/util-linux/discussions/4316 Signed-off-by: Karel Zak <kzak@redhat.com>