block: fix return code for partial write for Linux AIO
commit1c42f149ddc1ff7dd897ef2696ad662955a5ab2b
authorDenis V. Lunev <den@openvz.org>
Thu, 23 Jun 2016 11:37:16 +0000 (23 14:37 +0300)
committerKevin Wolf <kwolf@redhat.com>
Tue, 5 Jul 2016 14:46:26 +0000 (5 16:46 +0200)
tree06a89427b5b60bd4a24c24d518b9ecb598c40be0
parent5411541270f1d9e8eb1fb442fa4908c4398d5d88
block: fix return code for partial write for Linux AIO

Partial write most likely means that there is not space rather than
"something wrong happens". Thus it would be more natural to return
ENOSPC rather than EINVAL.

The problem actually happens with NBD server, which has reported EINVAL
rather then ENOSPC on the first error using its protocol, which makes
report to the user wrong.

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Pavel Borzenkov <pborzenkov@virtuozzo.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/linux-aio.c