GFS2: gfs2_edit fixes for 5.4
bz 483799
1. The ability for gfs2_edit to report on whether a given block is
free, allocated data, or allocated metadata or unlinked metadata.
This works on the interactive screen as well as -p blockalloc
Values printed are: 0 (free), 1 (data), 2 (unlinked), 3 (meta).
2. The ability for gfs2_edit to report on the metadata block type.
Use: -p <block> blocktype
Valid block types are: 0 (clump), 1 (superblock),
2 (Resource Group Header), 3 (Resource Group Bitmap),
4 (Dinode), 5 (Indirect Block), 6 (Directory Leaf),
7 (Journaled Data), 8 (Log Header), 9 (Log descriptor),
10 (Ext. attrib), 11 (Eattr Data), 12 (Log Buffer), 13 (invalid),
14 (Quota Change).
3. The ability for gfs2_edit to print out specific fields from
a structure, such as an inode or rg. -p <block> field <fieldname>
4. The ability for gfs2_edit to edit the file system through the
command line, like: -p <block> field <fieldname> <newval>
5. The ability to search for blocks of a given metadata type, which
is useful for digging through journals looking for evidence of
something that's gone wrong. In command-line mode, use:
-p <block> find <sb|rg|rb|di|in|lf|jd|lh|ld|ea|ed|lb|13|qc>
In interactive mode, change the block number to "/sb", "/rg", etc.
6. The ability to edit fields in structure mode. Right now, only
dinode and rg structures are editable. Others are ignored.
7. Fixed a bug whereby -p size went on to print other things.
8. The ability for gfs2_edit to print or change the metadata
block type through the cli. Use: -p <block> blocktype [newtype]
9. The ability for gfs2_edit to locate which RG or bitmap block
a certain block is associated with. (i.e. locate the RG that's
prior to the specified block). For RG use: -p <block> blockrg
For bitmaps use: -p <block> blockbits