public inbox for [email protected]
 help / color / mirror / Atom feed
From: Ming Lei <[email protected]>
To: Jens Axboe <[email protected]>
Cc: [email protected], Ming Lei <[email protected]>
Subject: Re: [PATCH] io_uring: add IORING_OP_NOP_FAIL
Date: Thu, 9 May 2024 12:03:07 +0800	[thread overview]
Message-ID: <CAFj5m9+QvchnhUgs3reCTXFEosR2H8NFoq9A-pZoewAg=_OMkQ@mail.gmail.com> (raw)
In-Reply-To: <Zjw9jIHtan4FAc9D@fedora>

On Thu, May 9, 2024 at 11:05 AM Ming Lei <[email protected]> wrote:
>
> On Wed, May 08, 2024 at 08:55:09PM -0600, Jens Axboe wrote:
> > On 5/8/24 8:34 PM, Ming Lei wrote:
> > > Add IORING_OP_NOP_FAIL so that it is easy to inject failure from
> > > userspace.
> > >
> > > Like IORING_OP_NOP, the main use case is test, and it is very helpful
> > > for covering failure handling code in io_uring core change.
> >
> > Rather than use a new opcode for this, why don't we just add it to
> > the existing NOP? I know we don't check for flags in currently, so
> > you would not know if it worked, but we could add that and just
> > backport that one-liner as well.
>
> Yeah, it is just for avoiding to break existed tests which may not build
> over liburing.
>
> I will switch to this way, looks one-line backporting can solve it.

I guess backporting can't work, because application code expects
NOP to complete successfully with and w/o non-zero sqe->rw_flags.

However, the backport has to fail NOP in case of non-zero sqe->rw_flags.

Thanks.


  reply	other threads:[~2024-05-09  4:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09  2:34 [PATCH] io_uring: add IORING_OP_NOP_FAIL Ming Lei
2024-05-09  2:55 ` Jens Axboe
2024-05-09  3:05   ` Ming Lei
2024-05-09  4:03     ` Ming Lei [this message]
2024-05-09 14:02     ` Jens Axboe

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='CAFj5m9+QvchnhUgs3reCTXFEosR2H8NFoq9A-pZoewAg=_OMkQ@mail.gmail.com' \
    [email protected] \
    [email protected] \
    [email protected] \
    /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