- To: mtk.manpages@xxxxxxxxx
- Subject: Re: aio_cancel
- From: Jon Grant <jg@xxxxxxxx>
- Date: Sat, 08 Oct 2011 23:42:12 +0100
- Cc: linux-man@xxxxxxxxxxxxxxx
- In-reply-to: <CAKgNAkhdZwP7hVH2GdmMV9CH4LTXURbO=TrAg0QgiG7_XXdQFg@mail.gmail.com>
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15
Michael Kerrisk wrote, On 05/10/11 05:37:
On Wed, Oct 5, 2011 at 2:08 AM, Jon Grant<jg@xxxxxxxx> wrote:
[.]
Could I ask a related question. When an aio block is cancelled, is there
anyway to get back the byte count that was processed? e.g. aio_read, the
number of bytes read before the operation was cancelled.
Offhand, I don't know. What happens if you try aio_return() +
aio_error()? When you find out, send me a patch!
I wrote a small program to write 30MB to a file with aio_write.
aio_cancel immediately after enqueing. aio_cancel returnend -1, and
errno was AIO_NOTCANCELED, so I guess it is not possible to cancel in my
Ubuntu glibc build.
BTW, could this aio_cancel text be updated to clarify if aio_error or
aio_cancel is returning AIO_ALLDONE.
" This function returns AIO_ALLDONE if
all requests had already been completed before this call. When
some error
occurs, -1 is returned, and errno is set appropriately."
My assumption would be that it refers to aio_Cancel, but as it follows
aio_error description.. could be unclear. Maybe the function name can be
added to the description.
Best regards, Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Netdev]
[Linux Ethernet Bridging]
[Linux Wireless]
[Kernel Newbies]
[Memory]
[Security]
[Linux for Hams]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux RAID]
[Linux Admin]
[Samba]
[Video 4 Linux]
[Linux Resources]