public inbox for [email protected]
 help / color / mirror / Atom feed
From: Stefan Metzmacher <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: Re: [PATCH] io_uring: add BUILD_BUG_ON() to assert the layout of struct io_uring_sqe
Date: Thu, 30 Jan 2020 17:01:45 +0100	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>


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

Am 30.01.20 um 16:51 schrieb Jens Axboe:
> On 1/29/20 6:39 AM, Stefan Metzmacher wrote:
>> With nesting of anonymous unions and structs it's hard to
>> review layout changes. It's better to ask the compiler
>> for these things.
> 
> I don't think I've once messed it up while adding new features,
> but I'm fine with adding this as an extra safeguard. Realistically,
> the regression tests would fail spectacularly if we ever did mess
> this up.

Only if you don't just use :-)

cp linux/include/uapi/linux/io_uring.h \
   liburing/src/include/liburing/io_uring.h

BTW: the current diff is

--- linux/include/uapi/linux/io_uring.h
+++ liburing/src/include/liburing/io_uring.h
@@ -43,7 +43,7 @@ struct io_uring_sqe {
                struct {
                        /* index into fixed buffers, if used */
                        __u16   buf_index;
-                       /* personality to use, if used */
+                       /* personality to use */
                        __u16   personality;
                };
                __u64   __pad2[3];
@@ -112,7 +112,6 @@ enum {
        IORING_OP_SEND,
        IORING_OP_RECV,
        IORING_OP_OPENAT2,
-       IORING_OP_EPOLL_CTL,

        /* this goes last, obviously */
        IORING_OP_LAST,
@@ -203,7 +202,6 @@ struct io_uring_params {
 #define IORING_FEAT_NODROP             (1U << 1)
 #define IORING_FEAT_SUBMIT_STABLE      (1U << 2)
 #define IORING_FEAT_RW_CUR_POS         (1U << 3)
-#define IORING_FEAT_CUR_PERSONALITY    (1U << 4)

 /*
  * io_uring_register(2) opcodes and arguments


metze




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

  reply	other threads:[~2020-01-30 16:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 13:22 [PATCH] io_uring: add BUILD_BUG_ON() to assert the layout of struct io_uring_sqe Stefan Metzmacher
2020-01-29 13:39 ` Stefan Metzmacher
2020-01-30 15:51   ` Jens Axboe
2020-01-30 16:01     ` Stefan Metzmacher [this message]
2020-01-30 16:06       ` 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 \
    [email protected] \
    [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