mbox series

[0/3] btrfs-progs: print-tree: cleanup for regular bitmap based flags print

Message ID cover.1728020867.git.wqu@suse.com (mailing list archive)
Headers show
Series btrfs-progs: print-tree: cleanup for regular bitmap based flags print | expand

Message

Qu Wenruo Oct. 4, 2024, 5:52 a.m. UTC
The first 2 are small cleanups for __print_readable_flag().

The last one introduces an sprint version, sprint_readable_flag(),
allowing the same bitmap handling of print_readable_flag() to be output
into a string buffer.

And use that sprint_readable_flag() to handle inode flags, inspired by a
recent report that Synology's out-of-tree btrfs can not be handled by
upstream kernel (unsupported inode flag).

This allows print-tree to handle the unknown flags of inode flags.

Unfortunately I didn't find any other location can benefit the
sprint_readable_flag() yet.

It's either bg flags which needs special handling for SINGLE profile, or
not bitmap in the first place (e.g. compress flags).

Qu Wenruo (3):
  btrfs-progs: print-tree: use ARRAY_SIZE() to replace open-coded ones
  btrfs-progs: print-tree: cleanup __print_readable_flag()
  btrfs-progs: print-tree: use readable_flag_entry for inode flags

 kernel-shared/print-tree.c | 128 +++++++++++++++++++++----------------
 1 file changed, 72 insertions(+), 56 deletions(-)

--
2.46.2