mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
btrfs: fix computation of max fs size for multiple device fs tests
We were sorting numerical values with the 'sort' tool without telling it that we are sorting numbers, giving us unexpected ordering. So just pass the '-n' option to the 'sort' tool. Example: $ echo -e "11\n9\n20" | sort 11 20 9 $ echo -e "11\n9\n20" | sort -n 9 11 20 Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
+1
-1
@@ -68,7 +68,7 @@ dev2_sz=`blockdev --getsize64 $dev2`
|
||||
dev3_sz=`blockdev --getsize64 $dev3`
|
||||
|
||||
# get min of both.
|
||||
max_fs_sz=`echo -e "$dev1_sz\n$dev2_sz\n$dev3_sz" | sort | head -1`
|
||||
max_fs_sz=`echo -e "$dev1_sz\n$dev2_sz\n$dev3_sz" | sort -n | head -1`
|
||||
# Need disks with more than 2G
|
||||
if [ $max_fs_sz -lt 2000000000 ]; then
|
||||
_scratch_dev_pool_put
|
||||
|
||||
Reference in New Issue
Block a user