GNOME Bugzilla – Bug 706914
Prepare for btrfs tools using IEC prefix multipliers
Last modified: 2013-09-18 16:54:16 UTC
Fix to follow.
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.
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
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
The patch to address this report has been included in GParted 0.16.2 released on September 18, 2013.