storage/reflink: open in binary mode for loopdev resize ioctl
The default (= text) mode for a loop device which contains a VM image looked weird, even though it didn't make a difference here because the dev_io object was never actually read from.
This commit is contained in:
parent
4cd9e42416
commit
9d5deffb13
@ -439,7 +439,7 @@ def _update_loopdev_sizes(img):
|
||||
continue
|
||||
except FileNotFoundError:
|
||||
continue
|
||||
with open('/dev/' + sys_path.split('/')[3]) as dev_io:
|
||||
with open('/dev/' + sys_path.split('/')[3], 'rb') as dev_io:
|
||||
fcntl.ioctl(dev_io.fileno(), LOOP_SET_CAPACITY)
|
||||
|
||||
def _attempt_ficlone(src, dst):
|
||||
|
Loading…
Reference in New Issue
Block a user