Bug 695767 - GFS2: [RFE] Add compression to gfs2_edit savemeta/restoremeta
Summary: GFS2: [RFE] Add compression to gfs2_edit savemeta/restoremeta
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gfs2-utils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andrew Price
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 702296 702313
TreeView+ depends on / blocked
 
Reported: 2011-04-12 16:06 UTC by Andrew Price
Modified: 2011-05-05 10:28 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
: 702296 702313 (view as bug list)
Environment:
Last Closed: 2011-05-05 09:50:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
First attempt (14.74 KB, patch)
2011-04-13 13:23 UTC, Andrew Price
no flags Details | Diff
Second attempt (24.61 KB, patch)
2011-04-14 16:29 UTC, Andrew Price
no flags Details | Diff
Third attempt (26.11 KB, patch)
2011-05-04 18:02 UTC, Andrew Price
no flags Details | Diff

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


Note You need to log in before you can comment on or make changes to this bug.