fix asynchronous ioctls
PATCH 1/2 fix asynchronous ioctls
posix_aio_read expect aio requests to return the number of bytes requests to be successfull, so we need to fake this up for ioctls.
[NB: this function is formatted using tabs, so the new code is too.
Or should I convert the whole function in my patch?]
posix-aio-compat.c +10 -1
@@ -90,7 +90,16 @@ static size_t handle_aiocb_ioctl(struct ret =ioctl (aiocb->aio_fildes, aiocb->aio_ioctl_cmd, aiocb->aio_ioctl_buf);if (ret ==-1 )return -errno; -return ret; + +/* +* This looks weird, but the aio code only consideres a request +* successfull if it has written the number full number of bytes. +* +* Now we overload aio_nbytes as aio_ioctl_cmd for the ioctl command, +* so in fact we return the ioctl command here to make posix_aio_read() +* happy.. +*/ +return aiocb->aio_nbytes; }#ifdef HAVE_PREADV
Quoted 9 lines · Christoph Hellwig
posix_aio_readexpect aio requests to return the number of bytes requests to be successfull, so we need to fake this up for ioctls.[NB: this function is formatted using tabs, so the new code is too.
Or should I convert the whole function in my patch?]Signed-off-by Christoph Hellwig <[email protected]>
Is there a 2/2?
Regards,
Anthony Liguori
Quoted 4 lines · Anthony Liguori
Quoted 3 lines · Christoph Hellwig
posix_aio_readexpect aio requests to return the number of bytes requests to be successfull, so we need to fake this up for ioctls.
Quoted 8 lines
Quoted 6 lines
[NB: this function is formatted using tabs, so the new code is too. Or should I convert the whole function in my patch?]
Signed-off-by Christoph Hellwig <[email protected]>Is there a 2/2?
2/2 is the SG_IO passthrough which I accidentally sent as reply to the previous version.
Quoted 2 lines · Christoph Hellwig
2/2 is the
SG_IOpassthrough which I accidentally sent as reply to the previous version.
Any reason you pulled in the SG_IO passthrough but not this patch?
It's not going to work without it :)
Also the commits list seems to be a lagging a little bit, can't find messages for at least the two patches you applied from me.