Bug 695767

Summary: GFS2: [RFE] Add compression to gfs2_edit savemeta/restoremeta
Product: [Fedora] Fedora Reporter: Andrew Price <anprice>
Component: gfs2-utilsAssignee: Andrew Price <anprice>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: adas, agk, bmarzins, fdinitto, rpeterso, swhiteho
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 702296 702313 (view as bug list) Environment:
Last Closed: 2011-05-05 09:50:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 702296, 702313    
Attachments:
Description Flags
First attempt
none
Second attempt
none
Third attempt none

Description Andrew Price 2011-04-12 16:06:20 UTC
(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?

Comment 1 Andrew Price 2011-04-13 13:23:23 UTC
Created attachment 491757 [details]
First attempt

Attaching a first attempt patch. The usually restoremeta warnings apply.

Comment 2 Andrew Price 2011-04-14 16:29:24 UTC
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).

Comment 3 Andrew Price 2011-05-04 18:02:14 UTC
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.

Comment 4 Andrew Price 2011-05-05 09:50:20 UTC
Third patch is now in gfs2_utils.git master