linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs-progs: print-tree: cleanup for regular bitmap based flags print
@ 2024-10-04  5:52 Qu Wenruo
  2024-10-04  5:52 ` [PATCH 1/3] btrfs-progs: print-tree: use ARRAY_SIZE() to replace open-coded ones Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Qu Wenruo @ 2024-10-04  5:52 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-04  5:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04  5:52 [PATCH 0/3] btrfs-progs: print-tree: cleanup for regular bitmap based flags print Qu Wenruo
2024-10-04  5:52 ` [PATCH 1/3] btrfs-progs: print-tree: use ARRAY_SIZE() to replace open-coded ones Qu Wenruo
2024-10-04  5:52 ` [PATCH 2/3] btrfs-progs: print-tree: cleanup __print_readable_flag() Qu Wenruo
2024-10-04  5:52 ` [PATCH 3/3] btrfs-progs: print-tree: use readable_flag_entry for inode flags Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).