gfs2-utils: Don't require an external print_it() in libgfs2
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest18 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | libgfs2: Move debugging printf out of build_master()gfs2/ gfs2/ | +4 | 0 replies | |
| 2/18 | libgfs2: Rework lgfs2_build_jindex()gfs2/ gfs2/ gfs2/ | +31 | 0 replies | |
| 3/18 | libgfs2: Move build_jindex() into fsck.gfs2gfs2/ gfs2/ gfs2/ +2 more | +23 | 0 replies | |
| 4/18 | libgfs2: Push down build_per_node() into the utilsgfs2/ gfs2/ gfs2/ +3 more | +117 | 0 replies | |
| 5/18 | libgfs2: Return the inode from build_inum_range()gfs2/ gfs2/ gfs2/ +3 more | +42 | 0 replies | |
| 6/18 | libgfs2: Return the inode from build_statfs_change()gfs2/ gfs2/ gfs2/ +3 more | +36 | 0 replies | |
| 7/18 | libgfs2: Return the inode from build_quota_change()gfs2/ gfs2/ gfs2/ +3 more | +33 | 0 replies | |
| 8/18 | libgfs2: Return the inode from build_inum()gfs2/ gfs2/ gfs2/ +3 more | +33 | 0 replies | |
| 9/18 | libgfs2: Return the inode from build_statfs()gfs2/ gfs2/ gfs2/ +3 more | +30 | 0 replies | |
| 10/18 | libgfs2: Return the inode from build_rindex()gfs2/ gfs2/ gfs2/ +3 more | +40 | 0 replies | |
| 11/18 | libgfs2: Return the inode from build_quota()gfs2/ gfs2/ gfs2/ +3 more | +37 | 0 replies | |
| 12/18 | libgfs2: Move debugging printf out of build_root()gfs2/ gfs2/ | +4 | 0 replies | |
| 13/18 | libgfs2: Remove debugging printf from do_init_statfs()gfs2/ gfs2/ gfs2/ +3 more | +13 | 0 replies | |
| 14/18 | libgfs2: Move debugging output out of do_init_inum()gfs2/ gfs2/ | +3 | 0 replies | |
| 15/18 | libgfs2: Remove debugging printfs from fix_device_geometry()gfs2/ | +0 | 0 replies | |
| 16/18 | libgfs2: Remove config.[ch]gfs2/ gfs2/ gfs2/ +6 more | +0 | 0 replies | |
| 17/18 | libgfs2: Move struct printing functions out of libgfs2gfs2/ gfs2/ gfs2/ +9 more | +496 | 0 replies | |
| 18/18 | libgfs2: Remove print_it extern requirementgfs2/ gfs2/ gfs2/ +12 more | +198 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Cluster-devel] [PATCH 00/18] gfs2-utils: Don't require an external print_it() in libgfs2
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
Signature · 1 line
2.34.1