qcow2: simplify logic in qcow2_co_write_zeroes
commitba142846b0f608c433e71d61efc6467c7b367dbf
authorDenis V. Lunev <den@openvz.org>
Thu, 26 May 2016 03:48:46 +0000 (25 21:48 -0600)
committerKevin Wolf <kwolf@redhat.com>
Wed, 8 Jun 2016 08:21:08 +0000 (8 10:21 +0200)
tree59656190a57f5c912c211ebf054076e72dd477d9
parent443668ca408cdb7f01e1a70a58518bb100c3e9d1
qcow2: simplify logic in qcow2_co_write_zeroes

Unaligned requests will occupy only one cluster. This is true since the
previous commit. Simplify the code taking this consideration into
account.

In other words, the caller is now buggy if it ever passes us an unaligned
request that crosses cluster boundaries (the only requests that can cross
boundaries will be aligned).

There are no other changes so far.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
CC: Eric Blake <eblake@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
Message-Id: <1463476543-3087-3-git-send-email-den@openvz.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2.c