All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 00/18] gfs2-utils: Don't require an external print_it() in libgfs2
@ 2022-01-12 19:26 Andrew Price
  2022-01-12 19:26 ` [Cluster-devel] [PATCH 01/18] libgfs2: Move debugging printf out of build_master() Andrew Price
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: Andrew Price @ 2022-01-12 19:26 UTC (permalink / raw)
  To: cluster-devel.redhat.com

This patch set fixes a long-standing issue in libgfs2 where it requires apps linking to it to provide a print_it function, which it uses in lgfs2_(struct)_print() functions defined in libgfs2/ondisk.c. This was the main blocker to it becoming a library in a more meaningful sense.

The approach taken is to remove the responsibility of printing gfs2 structures from libgfs2 altogether. So the first challenge is to remove debugging output from libgfs2 and push it down into the utils, which in turn required returning more context from some libgfs2 functions, mainly the build_* functions in structures.c.

The overall result is more flexibility and control over the way the utils print on-disk structures and improved error/debug messages. Test code is also tidied up as we no longer have to define a print_it() in each of the tests.


Andrew Price (18):
  libgfs2: Move debugging printf out of build_master()
  libgfs2: Rework lgfs2_build_jindex()
  libgfs2: Move build_jindex() into fsck.gfs2
  libgfs2: Push down build_per_node() into the utils
  libgfs2: Return the inode from build_inum_range()
  libgfs2: Return the inode from build_statfs_change()
  libgfs2: Return the inode from build_quota_change()
  libgfs2: Return the inode from build_inum()
  libgfs2: Return the inode from build_statfs()
  libgfs2: Return the inode from build_rindex()
  libgfs2: Return the inode from build_quota()
  libgfs2: Move debugging printf out of build_root()
  libgfs2: Remove debugging printf from do_init_statfs()
  libgfs2: Move debugging output out of do_init_inum()
  libgfs2: Remove debugging printfs from fix_device_geometry()
  libgfs2: Remove config.[ch]
  libgfs2: Move struct printing functions out of libgfs2
  libgfs2: Remove print_it extern requirement

 gfs2/convert/gfs2_convert.c    |  80 +++++---
 gfs2/edit/Makefile.am          |   2 +
 gfs2/edit/extended.c           |  18 +-
 gfs2/edit/gfs2hex.c            | 156 +-------------
 gfs2/edit/hexedit.c            |  36 +---
 gfs2/edit/hexedit.h            |   4 +-
 gfs2/edit/struct_print.c       | 364 +++++++++++++++++++++++++++++++++
 gfs2/edit/struct_print.h       |  23 +++
 gfs2/fsck/fs_recovery.c        |  21 ++
 gfs2/fsck/fs_recovery.h        |   1 +
 gfs2/fsck/fsck.h               |   1 +
 gfs2/fsck/initialize.c         |  75 +++----
 gfs2/fsck/main.c               |  13 +-
 gfs2/fsck/pass1.c              |  86 +++++++-
 gfs2/fsck/pass2.c              |  37 +++-
 gfs2/glocktop/glocktop.c       |   3 +-
 gfs2/libgfs2/Makefile.am       |   2 -
 gfs2/libgfs2/check_libgfs2.c   |   3 -
 gfs2/libgfs2/checks.am         |   1 -
 gfs2/libgfs2/config.c          |   9 -
 gfs2/libgfs2/config.h          |   6 -
 gfs2/libgfs2/device_geometry.c |   7 -
 gfs2/libgfs2/gfs2l.c           |   3 -
 gfs2/libgfs2/libgfs2.h         |  40 +---
 gfs2/libgfs2/ondisk.c          | 199 ------------------
 gfs2/libgfs2/structures.c      | 226 ++++----------------
 gfs2/mkfs/Makefile.am          |   2 +
 gfs2/mkfs/gfs2_mkfs.h          |  11 -
 gfs2/mkfs/main_jadd.c          |   1 -
 gfs2/mkfs/main_mkfs.c          | 152 +++++++++++---
 gfs2/mkfs/struct_print.c       | 218 ++++++++++++++++++++
 gfs2/mkfs/struct_print.h       |  19 ++
 tests/nukerg.c                 |   3 -
 33 files changed, 1067 insertions(+), 755 deletions(-)
 create mode 100644 gfs2/edit/struct_print.c
 create mode 100644 gfs2/edit/struct_print.h
 delete mode 100644 gfs2/libgfs2/config.c
 delete mode 100644 gfs2/libgfs2/config.h
 create mode 100644 gfs2/mkfs/struct_print.c
 create mode 100644 gfs2/mkfs/struct_print.h

-- 
2.34.1



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

end of thread, other threads:[~2022-01-12 19:26 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 19:26 [Cluster-devel] [PATCH 00/18] gfs2-utils: Don't require an external print_it() in libgfs2 Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 01/18] libgfs2: Move debugging printf out of build_master() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 02/18] libgfs2: Rework lgfs2_build_jindex() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 03/18] libgfs2: Move build_jindex() into fsck.gfs2 Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 04/18] libgfs2: Push down build_per_node() into the utils Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 05/18] libgfs2: Return the inode from build_inum_range() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 06/18] libgfs2: Return the inode from build_statfs_change() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 07/18] libgfs2: Return the inode from build_quota_change() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 08/18] libgfs2: Return the inode from build_inum() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 09/18] libgfs2: Return the inode from build_statfs() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 10/18] libgfs2: Return the inode from build_rindex() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 11/18] libgfs2: Return the inode from build_quota() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 12/18] libgfs2: Move debugging printf out of build_root() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 13/18] libgfs2: Remove debugging printf from do_init_statfs() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 14/18] libgfs2: Move debugging output out of do_init_inum() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 15/18] libgfs2: Remove debugging printfs from fix_device_geometry() Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 16/18] libgfs2: Remove config.[ch] Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 17/18] libgfs2: Move struct printing functions out of libgfs2 Andrew Price
2022-01-12 19:26 ` [Cluster-devel] [PATCH 18/18] libgfs2: Remove print_it extern requirement Andrew Price

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.