After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706914 - Prepare for btrfs tools using IEC prefix multipliers
Prepare for btrfs tools using IEC prefix multipliers
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
GIT HEAD
Other Linux
: Normal normal
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2013-08-27 18:40 UTC by Mike Fleetwood
Modified: 2013-09-18 16:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Accept btrfs IEC prefixes (v1) (3.39 KB, patch)
2013-08-27 19:02 UTC, Mike Fleetwood
none Details | Review
btrfs.sh - test program (2.99 KB, application/x-shellscript)
2013-08-27 19:10 UTC, Mike Fleetwood
  Details

Description Mike Fleetwood 2013-08-27 18:40:24 UTC
Fix to follow.
Comment 1 Mike Fleetwood 2013-08-27 19:02:17 UTC
Created attachment 253293 [details] [review]
Accept btrfs IEC prefixes (v1)

Hi Curtis,

Here's the patch for this.  Makes GParted ready to accept btrfs-progs
changing how sizes are show.
Comment 2 Mike Fleetwood 2013-08-27 19:10:49 UTC
Created attachment 253298 [details]
btrfs.sh - test program

I used this shell script to modify the output of "btrfs filesystem show"
to match known and likely future outputs.  Tests were:

1) export BTRFS_SH=''
2) export BTRFS_SH='space before multiplier'
3) export BTRFS_SH='IEC prefix'
4) export BTRFS_SH='IEC prefix, space before multiplier'
5) export BTRFS_SH='units with B'
6) export BTRFS_SH='units with B, space before multiplier'
7) export BTRFS_SH='units'

For each test case I ran:
  btrfs filesystem show /dev/sda7
  (Old gparted)
  (New gparted)
To see how the output was modified and test GParted could read that
output.

Thanks,
Mike
Comment 3 Curtis Gedak 2013-08-29 16:29:14 UTC
Hi Mike,

Thank you for discovering this problem early, likely before any of our users would have even encountered it.  :-)

The patch in comment #1 looks good to me, and thank you also for providing a test script so that I did not have to create a virtual machine with the appropriate kernel and btrfs version to test.

In my mind the most important test was that the btrfs versions prior to the IEC prefix change would continue to work, and in my testing the old code and the new patched code responded identically.  Great work!

The patch has been committed to the git repository for inclusion in the next release of GParted.

The relevant git commit can be viewed at the following link:

Also accept btrfs tools using IEC prefix multipliers (#706914)
https://git.gnome.org/browse/gparted/commit/?id=78c558c350a22c72fa1c9a5b7224e66a0af225d9
Comment 4 Curtis Gedak 2013-09-18 16:54:16 UTC
The patch to address this report has been included in GParted 0.16.2 released on September 18, 2013.