IO-Uring Archive on
 help / color / Atom feed
From: Stefan Metzmacher <>
To: Jens Axboe <>, io-uring <>
Cc: 李通洲 <>
Subject: Re: [PATCH] io_uring: add support for probing opcodes
Date: Thu, 16 Jan 2020 23:35:28 +0100
Message-ID: <> (raw)
In-Reply-To: <>

[-- Attachment #1.1: Type: text/plain, Size: 1312 bytes --]

Am 16.01.20 um 18:23 schrieb Jens Axboe:
> The application currently has no way of knowing if a given opcode is
> supported or not without having to try and issue one and see if we get
> -EINVAL or not. And even this approach is fraught with peril, as maybe
> we're getting -EINVAL due to some fields being missing, or maybe it's
> just not that easy to issue that particular command without doing some
> other leg work in terms of setup first.
> This adds IORING_REGISTER_PROBE, which fills in a structure with info
> on what it supported or not. This will work even with sparse opcode
> fields, which may happen in the future or even today if someone
> backports specific features to older kernels.

That's funny I was just thinking about exactly that topic before
I opened the io-uring mail folder:-)

That's will make it much easier to write a portable
vfs backend for samba that doesn't depend on the kernel
features at build time.

> +	p->last_op = IORING_OP_LAST - 1;
> +	/* stock kernel isn't sparse, so everything is supported */
> +	for (i = 0; i < nr_args; i++) {
> +		p->ops[i].op = i;

Shouldn't there be an if (i <= p->last_op) before we pretent to support
an opcode? Or we need to truncate nr_args

> +		p->ops[i].flags = IO_URING_OP_SUPPORTED;
> +	}


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 17:23 Jens Axboe
2020-01-16 22:35 ` Stefan Metzmacher [this message]
2020-01-16 22:36   ` Jens Axboe

Reply instructions:

You may reply publically 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:

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

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

IO-Uring Archive on

Archives are clonable:
	git clone --mirror io-uring/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 io-uring io-uring/ \
	public-inbox-index io-uring

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone