All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Grant <jg-hus3n9K41k0@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: aio_cancel
Date: Sat, 08 Oct 2011 23:42:12 +0100	[thread overview]
Message-ID: <4E90D1C4.3090104@jguk.org> (raw)
In-Reply-To: <CAKgNAkhdZwP7hVH2GdmMV9CH4LTXURbO=TrAg0QgiG7_XXdQFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Michael Kerrisk wrote, On 05/10/11 05:37:
> On Wed, Oct 5, 2011 at 2:08 AM, Jon Grant<jg-hus3n9K41k0@public.gmane.org>  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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-10-08 22:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 22:03 aio_cancel Jon Grant
     [not found] ` <CAGc9Evf=94fyfYM67q0BRJCN=vu14aYV91pE+Hw=uhgkVS5p5g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-04  5:42   ` aio_cancel Michael Kerrisk
     [not found]     ` <CAKgNAkgcKRrdepNS9jQw=MzNY+sRpP+-idDEfpT0ALBJOJ3w1w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-05  0:08       ` aio_cancel Jon Grant
     [not found]         ` <4E8BA018.5070707-hus3n9K41k0@public.gmane.org>
2011-10-05  4:37           ` aio_cancel Michael Kerrisk
     [not found]             ` <CAKgNAkhdZwP7hVH2GdmMV9CH4LTXURbO=TrAg0QgiG7_XXdQFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-08 22:42               ` Jon Grant [this message]
     [not found]                 ` <4E90D1C4.3090104-hus3n9K41k0@public.gmane.org>
2012-04-17 20:16                   ` aio_cancel Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E90D1C4.3090104@jguk.org \
    --to=jg-hus3n9k41k0@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.