diff options
author | Tomáš Golembiovský <tgolembi@redhat.com> | 2016-11-03 14:47:49 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-11-11 15:54:55 +0100 |
commit | 80a15e3e2eed96926d886693663503985c9a98bb (patch) | |
tree | a25918664fdefea27c1c7062ca3af04a1ecc9321 /balloon.c | |
parent | 40332872fec584d2557ed2c3f48d55d15d95eddb (diff) |
raw_bsd: don't check size alignment when only offset is set
We make sure that the size is aligned to sector length to prevent any
round ups. Otherwise we could end up reading/writing data outside the
area specified by user. This is only needed when user supplies the size
option to avoid any surprises. It is not necessary when only offset is
set.
More over, the check made it difficult to use the offset option without
size option. The check puts unneeded restriction on the offset which had
to be aligned too. Because bdrv_getlength() returns aligned value having
unaligned offset would make the check fail.
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'balloon.c')
0 files changed, 0 insertions, 0 deletions