storage/reflink: show size in refused volume shrink message

Like e6bb282 did for lvm.
This commit is contained in:
Rusty Bird 2018-03-11 15:34:56 +00:00
parent c31d317c63
commit 023cb49293
No known key found for this signature in database
GPG Key ID: 469D78F47AAF2ADF

View File

@ -223,9 +223,9 @@ class ReflinkVolume(qubes.storage.Volume):
if size < self.size:
raise qubes.storage.StoragePoolException(
'For your own safety, shrinking of {!s} is disabled.'
' If you really know what you are doing,'
' use "truncate" manually.'.format(self.vid))
'For your own safety, shrinking of {!s} is disabled'
' ({:d} < {:d}). If you really know what you are doing,'
' use "truncate" manually.'.format(self.vid, size, self.size))
try: # assume volume is not (cleanly) stopped ...
_resize_file(self._path_dirty, size)