blktap2: Invalid logic detecting unaligned buffers in vhd_write_block
authorRoss Philipson <ross.philipson@gmail.com>
Wed, 6 Apr 2016 14:38:59 +0000 (15:38 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 6 Apr 2016 14:50:45 +0000 (15:50 +0100)
commit671361d40526cff052b97bfe16dc901d851899f0
tree21f903e14abfa3154b8167badb1afd3a59696fbb
parent5cf46a66883ad7a56c5bdee97696373473f80974
blktap2: Invalid logic detecting unaligned buffers in vhd_write_block

It seems the logic is meant to detect sector unaligned buffers for block
writes. The NOTing of the logic instead masks off any unaligned bits and
also would cause the function to always fail. It seems the function is not
used in any of the tools so that is probably why the problem is not seen.
In the vhd_read_block function it is correct.

Signed-off-by: Ross Philipson <ross.philipson@ainfosec.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/blktap2/vhd/lib/libvhd.c