diff options
author | bunder2015 <[email protected]> | 2018-04-17 13:52:53 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-04-17 10:52:53 -0700 |
commit | b40d45bc6c0e908c4d1086ac8ac3dcd1f7178d2a (patch) | |
tree | 49f3ab4ba19dcc863232cff191933cb1dced9cd0 | |
parent | 7f96cc23acf78a325897498b91416b7831a539e3 (diff) |
ZTS: fix reservation_013_pos integer overflow
When using large disks the integers for calculating sizes can
overflow past 2**31. Changing to long integers with typeset
should correct this.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: bunder2015 <[email protected]>
Closes #4444
Closes #7451
-rwxr-xr-x | tests/zfs-tests/tests/functional/reservation/reservation_013_pos.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/zfs-tests/tests/functional/reservation/reservation_013_pos.sh b/tests/zfs-tests/tests/functional/reservation/reservation_013_pos.sh index 4ef15d5b6..6a80bb575 100755 --- a/tests/zfs-tests/tests/functional/reservation/reservation_013_pos.sh +++ b/tests/zfs-tests/tests/functional/reservation/reservation_013_pos.sh @@ -75,9 +75,9 @@ space_avail=$(get_prop available $TESTPOOL) [[ $? -ne 0 ]] && \ log_fail "Unable to get space available property for $TESTPOOL" -((resv_set = space_avail / 5)) +typeset -il resv_set=space_avail/5 resv_set=$(floor_volsize $resv_set) -((sparse_vol_set_size = space_avail * 5)) +typeset -il sparse_vol_set_size=space_avail*5 sparse_vol_set_size=$(floor_volsize $sparse_vol_set_size) # When initially created, a regular volume's reservation property is set |