block: Don't ignore flags in blk_{,co,aio}_write_zeroes()
commit16aaf975eeed92cce602a844f795a027182a6861
authorKevin Wolf <kwolf@redhat.com>
Fri, 15 Apr 2016 08:21:04 +0000 (15 10:21 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Apr 2016 15:22:12 +0000 (15 17:22 +0200)
tree46e74d325af610f4e6b928ff8ad009fedb9f1394
parent9c057d0b68df65b5725d9c67009e3de66e0f39f4
block: Don't ignore flags in blk_{,co,aio}_write_zeroes()

Commit 57d6a428 neglected to pass the given flags to blk_aio_prwv(),
which broke discard by WRITE SAME for scsi-disk (the UNMAP bit would be
ignored).

Commit fc1453cd introduced the same bug for blk_write_zeroes(). This is
used for 'qemu-img convert' without has_zero_init (e.g. on a block
device) and for preallocation=falloc in parallels.

Commit 8896e088 is the version for blk_co_write_zeroes(). This function
is only used in qemu-io.

Reported-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
block/block-backend.c