summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbtrfs-shrink5
1 files changed, 5 insertions, 0 deletions
diff --git a/btrfs-shrink b/btrfs-shrink
index a9bbee7..12f0e8e 100755
--- a/btrfs-shrink
+++ b/btrfs-shrink
@@ -76,6 +76,11 @@ main()
76 rmdir "$mountpoint" 76 rmdir "$mountpoint"
77 if [ "$truncate" ] 77 if [ "$truncate" ]
78 then 78 then
79 r=$((truncate % 4096))
80 if [ $r -ne 0 ]
81 then
82 truncate=$((truncate + 4096 - r))
83 fi
79 truncate -s "$truncate" "$1" 84 truncate -s "$truncate" "$1"
80 fi 85 fi
81 return $result 86 return $result