linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Benjamin LaHaise <bcrl@kvack.org>
Cc: Kent <kmo@daterainc.com>, Zach <zab@redhat.com>,
	linux-fsdevel@vger.kernel.org, linux-aio@kvack.org
Subject: Re: io_cancel return value change
Date: Mon, 18 Aug 2014 14:25:20 -0400	[thread overview]
Message-ID: <x49k365r6y7.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20140818181538.GD2590@kvack.org> (Benjamin LaHaise's message of "Mon, 18 Aug 2014 14:15:38 -0400")

Benjamin LaHaise <bcrl@kvack.org> writes:

> Cancellation is inherently racy.  It is and always has been possible for 
> an attempt at cancellation to fail, or for the attempt at cancellation to 
> suceed in the bigger picture yet have the io_cancel() call fail (and cause 
> an event to be delivered).  Applications always have and always will have 
> to handle an io_cancel() call potentially failing with the kernel delivering 
> a completion event.  You have to read the io_cancel() man page with that 
> understanding in place.

Sorry, Ben, Zach just pointed out what I was so obviously missing.  From
the changelog:

   This gets rid of the unused io_event argument to kiocb_cancel() and
   kiocb->ki_cancel(), and changes io_cancel() to return -EINPROGRESS if
   kiocb->ki_cancel() returned success.

Somehow I managed to skip right over that change to return
-EINPROGRESS.  *facepalm*

Cheers,
Jeff

      reply	other threads:[~2014-08-18 18:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15 19:27 io_cancel return value change Jeff Moyer
2014-08-18 14:49 ` Benjamin LaHaise
2014-08-18 17:33   ` Jeff Moyer
2014-08-18 18:15     ` Benjamin LaHaise
2014-08-18 18:25       ` Jeff Moyer [this message]

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=x49k365r6y7.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=bcrl@kvack.org \
    --cc=kmo@daterainc.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=zab@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).