(Bob's idea) 1) "gfs2_edit savemeta" should compress metadata. 2) "gfs2_edit restoremeta" should decompress the metadata if it recognises the file as being compressed Things to decide: a) Preference of bzip2, gzip, or other for compression? b) --nozip flag to turn off the feature and just save the metadata as before?
Created attachment 491757 [details] First attempt Attaching a first attempt patch. The usually restoremeta warnings apply.
Created attachment 492167 [details] Second attempt This patch adds a -nocompress option, abstracts away the calls to write/gzwrite, and adds more documentation. It also uses compression level 5 instead of the default 6 as it seems to speed up the compression significantly with very little effect on the compressed file size (for my small test cases at least).
Created attachment 496861 [details] Third attempt This revision of the patch replaces the -nocompress option with the -z <0-9> option and removes the unnecessary strdup() mentioned on the mailing list.
Third patch is now in gfs2_utils.git master