From: Andrew Price Date: Thu, 6 Aug 2020 14:37:35 +0100 Subject: [Cluster-devel] [PATCH 00/32] gfs2-utils: savemeta improvements Message-ID: <20200806133807.111280-1-anprice@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This is some groundwork for ongoing performance improvements to gfs2_edit savemeta (and fsck.gfs2 indirectly). These patches are generally beneficial and have survived a bunch of testing so I'm posting them now. The first handful are scattered cleanups and general removal of gfs2_buffer_heads uses to make things more flexible. The theme of the savemeta changes is mainly about creating a better split between reading and saving blocks so that we can make better decisions between those paths, e.g. in some cases we want to collect together ranges of blocks for reading when we know that they're consecutive. Andrew Price (32): savemeta: Allow saving to /dev/null mkfs.gfs2: Fix strncpy warnings libgfs2: Separate out gfs2l's language API glocktop: Improve mount info handling savemeta: Don't save bad xattr blocks twice libgfs2: Remove gfs2_buffer_head from gfs_dinode_in() libgfs2: Remove gfs2_buffer_head from lgfs2_gfs_inode_get() libgfs2: Remove gfs2_buffer_head from lgfs2_write_journal_data() libgfs2: Move get_file_buf() into structures.c gfs2l: Remove uses of gfs2_buffer_heads libgfs2: No need to use gfs2_buffer_head in metapointer() gfs2_edit: Don't use gfs2_buffer_head in do_dinode_extended() args libgfs2: Add a display name field to struct lgfs2_metadata gfs2_edit: get_block_type() improvements gfs2_edit: Don't use gfs2_buffer_head in display_block_type() gfs2_edit: Don't use gfs2_buffer_head in display_gfs2() gfs2_edit: restore_block() improvements savemeta: Simplify di_save_len() savemeta: Remove gfs2_buffer_head from get_gfs_struct_info() savemeta: Remove gfs2_buffer_head from save_bh() (and rename it) savemeta: Don't use gfs2_buffer_head in save_leaf_chain() savemeta: Remove gfs2_buffer_head from save_block() savemeta: Split block reading from saving savemeta: Call get_struct_info() in the read path savemeta: Introduce multi-block reads savemeta: Process indirect pointers in chunks savemeta: Don't trim off trailing zeroes when compressing savemeta: Leaf block processing improvements savemeta: Remove some unnecessary reads from save_inode_data() savemeta: Remove some unnecessary jindex reading code savemeta: Move block range queue ops into functions restoremeta: Fix up superblock processing gfs2/convert/gfs2_convert.c | 2 +- gfs2/edit/gfs2hex.c | 52 ++- gfs2/edit/gfs2hex.h | 5 +- gfs2/edit/hexedit.c | 170 +++------ gfs2/edit/hexedit.h | 9 +- gfs2/edit/journal.c | 59 ++-- gfs2/edit/savemeta.c | 672 ++++++++++++++++++++++-------------- gfs2/fsck/metawalk.c | 2 +- gfs2/glocktop/glocktop.c | 189 +++++----- gfs2/libgfs2/Makefile.am | 14 +- gfs2/libgfs2/buf.c | 4 +- gfs2/libgfs2/fs_ops.c | 33 +- gfs2/libgfs2/gfs1.c | 49 ++- gfs2/libgfs2/gfs2l.c | 1 + gfs2/libgfs2/lang.c | 121 ++++--- gfs2/libgfs2/lang.h | 15 + gfs2/libgfs2/libgfs2.h | 32 +- gfs2/libgfs2/meta.c | 30 +- gfs2/libgfs2/structures.c | 52 ++- gfs2/mkfs/main_mkfs.c | 4 +- tests/edit.at | 8 + 21 files changed, 826 insertions(+), 697 deletions(-) -- 2.26.2