block: Assert that flags are in range
commitfa166538743d4e28de7374c41332c3e448826f4b
authorEric Blake <eblake@redhat.com>
Mon, 13 Jun 2016 18:56:35 +0000 (13 12:56 -0600)
committerKevin Wolf <kwolf@redhat.com>
Thu, 16 Jun 2016 13:19:55 +0000 (16 15:19 +0200)
tree38862e89a19f63d9331ff03df6447e7acddbd209
parent73698c30caaf16e990b8b2e6e7bc64928947e65e
block: Assert that flags are in range

Add a new BDRV_REQ_MASK constant, and use it to make sure that
caller flags are always valid.

Tested with 'make check' and with qemu-iotests on both '-raw'
and '-qcow2'; the only failure turned up was fixed in the
previous commit.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io.c
include/block/block.h