From: Jens Axboe <[email protected]>
To: Stefan Metzmacher <[email protected]>, [email protected]
Subject: Re: [PATCH v1] io_uring_cqe_get_data() only requires a const struct io_uring_cqe *cqe
Date: Thu, 6 Feb 2020 12:13:58 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 2/6/20 10:05 AM, Stefan Metzmacher wrote:
>>> While researching that I noticed that IOSQE_FIXED_FILE
>>> seems to be ignored for some new commands, I think that
>>> all commands with on input fd, should be able to use that flag.
>>> Can this be fixed before 5.6 final?
>>
>> Do you have specifics? Generally the file grabbing happens as part of
>> request prep, and the individual opcodes should not need to bother with
>> it.
>
> io_statx_prep():
> io_openat_prep():
> io_openat2_prep():
>
> req->open.dfd = READ_ONCE(sqe->fd);
>
>
> io_statx():
> ret = filename_lookup(ctx->dfd, ctx->filename, lookup_flags...
>
> io_openat2():
>
> file = do_filp_open(req->open.dfd, req->open.filename, &op);
>
> io_close_prep(): has this to make it clear that IOSQE_FIXED_FILE is not
> supported, I guess because FILE_UPDATE with -1 needs to be used instead?
>
> if (sqe->flags & IOSQE_FIXED_FILE)
> return -EINVAL;
>
> req->close.fd = READ_ONCE(sqe->fd);
>
>
> I guess at least we need if (sqe->flags & IOSQE_FIXED_FILE) in all
> cases, if we can't just fix it.
Ah yes good point, on both honoring it and failing it for close() when
we do honor it. I'll fix that up.
--
Jens Axboe
next prev parent reply other threads:[~2020-02-06 19:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 16:02 [PATCH v1] io_uring_cqe_get_data() only requires a const struct io_uring_cqe *cqe Stefan Metzmacher
2020-02-06 16:04 ` Jens Axboe
2020-02-06 16:37 ` Stefan Metzmacher
2020-02-06 16:42 ` Jens Axboe
2020-02-06 17:05 ` Stefan Metzmacher
2020-02-06 19:13 ` Jens Axboe [this message]
2020-02-07 23:45 ` Stefan Metzmacher
2020-02-08 19:53 ` 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