mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common: helper to print raw byte output from qgroup show
Newer versions of btrfs-progs change the default output of 'qgroup show', we have to check what version is running and use the right option if needed. Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
ed48b428c6
commit
2b2fe1a658
@@ -2799,6 +2799,13 @@ _btrfs_stress_replace()
|
||||
done
|
||||
}
|
||||
|
||||
# find the right option to force output in bytes, older versions of btrfs-progs
|
||||
# print that by default, newer print human readable numbers with unit suffix
|
||||
_btrfs_qgroup_units()
|
||||
{
|
||||
$BTRFS_UTIL_PROG qgroup show --help 2>&1 | grep -q -- --raw && echo "--raw"
|
||||
}
|
||||
|
||||
# return device size in kb
|
||||
_get_device_size()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user