Message ID | 20210603051836.2614535-1-dkadashev@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | io_uring: add mkdir, [sym]linkat and mknodat support | expand |
On Thu, Jun 3, 2021 at 12:18 PM Dmitry Kadashev <dkadashev@gmail.com> wrote: > > This started out as an attempt to add mkdirat support to io_uring which > is heavily based on renameat() / unlinkat() support. > > During the review process more operations were added (linkat, symlinkat, > mknodat) mainly to keep things uniform internally (in namei.c), and > with things changed in namei.c adding support for these operations to > io_uring is trivial, so that was done too. See > https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ Ping. Jens, are we waiting for the audit change to be merged before this can go in?
On 6/18/21 12:24 AM, Dmitry Kadashev wrote: > On Thu, Jun 3, 2021 at 12:18 PM Dmitry Kadashev <dkadashev@gmail.com> wrote: >> >> This started out as an attempt to add mkdirat support to io_uring which >> is heavily based on renameat() / unlinkat() support. >> >> During the review process more operations were added (linkat, symlinkat, >> mknodat) mainly to keep things uniform internally (in namei.c), and >> with things changed in namei.c adding support for these operations to >> io_uring is trivial, so that was done too. See >> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ > > Ping. Jens, are we waiting for the audit change to be merged before this > can go in? Not necessarily, as that should go in for 5.14 anyway. Al, are you OK with the generic changes?
On 6/18/21 10:10 AM, Jens Axboe wrote: > On 6/18/21 12:24 AM, Dmitry Kadashev wrote: >> On Thu, Jun 3, 2021 at 12:18 PM Dmitry Kadashev <dkadashev@gmail.com> wrote: >>> >>> This started out as an attempt to add mkdirat support to io_uring which >>> is heavily based on renameat() / unlinkat() support. >>> >>> During the review process more operations were added (linkat, symlinkat, >>> mknodat) mainly to keep things uniform internally (in namei.c), and >>> with things changed in namei.c adding support for these operations to >>> io_uring is trivial, so that was done too. See >>> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ >> >> Ping. Jens, are we waiting for the audit change to be merged before this >> can go in? > > Not necessarily, as that should go in for 5.14 anyway. > > Al, are you OK with the generic changes? I have tentatively queued this up.
On 6/2/21 11:18 PM, Dmitry Kadashev wrote: > This started out as an attempt to add mkdirat support to io_uring which > is heavily based on renameat() / unlinkat() support. > > During the review process more operations were added (linkat, symlinkat, > mknodat) mainly to keep things uniform internally (in namei.c), and > with things changed in namei.c adding support for these operations to > io_uring is trivial, so that was done too. See > https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ > > The first patch is preparation with no functional changes, makes > do_mkdirat accept struct filename pointer rather than the user string. > > The second one leverages that to implement mkdirat in io_uring. > > 3-6 just convert other similar do_* functions in namei.c to accept > struct filename, for uniformity with do_mkdirat, do_renameat and > do_unlinkat. No functional changes there. > > 7 changes do_* helpers in namei.c to return ints rather than some of > them returning ints and some longs. > > 8-10 add symlinkat, linkat and mknodat support to io_uring > (correspondingly). > > Based on for-5.14/io_uring. Can you send in the liburing tests as well?
On 6/21/21 9:57 AM, Jens Axboe wrote: > On 6/2/21 11:18 PM, Dmitry Kadashev wrote: >> This started out as an attempt to add mkdirat support to io_uring which >> is heavily based on renameat() / unlinkat() support. >> >> During the review process more operations were added (linkat, symlinkat, >> mknodat) mainly to keep things uniform internally (in namei.c), and >> with things changed in namei.c adding support for these operations to >> io_uring is trivial, so that was done too. See >> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ >> >> The first patch is preparation with no functional changes, makes >> do_mkdirat accept struct filename pointer rather than the user string. >> >> The second one leverages that to implement mkdirat in io_uring. >> >> 3-6 just convert other similar do_* functions in namei.c to accept >> struct filename, for uniformity with do_mkdirat, do_renameat and >> do_unlinkat. No functional changes there. >> >> 7 changes do_* helpers in namei.c to return ints rather than some of >> them returning ints and some longs. >> >> 8-10 add symlinkat, linkat and mknodat support to io_uring >> (correspondingly). >> >> Based on for-5.14/io_uring. > > Can you send in the liburing tests as well? Ah nevermind, you already did...
On Mon, Jun 21, 2021 at 09:21:23AM -0600, Jens Axboe wrote: > On 6/18/21 10:10 AM, Jens Axboe wrote: > > On 6/18/21 12:24 AM, Dmitry Kadashev wrote: > >> On Thu, Jun 3, 2021 at 12:18 PM Dmitry Kadashev <dkadashev@gmail.com> wrote: > >>> > >>> This started out as an attempt to add mkdirat support to io_uring which > >>> is heavily based on renameat() / unlinkat() support. > >>> > >>> During the review process more operations were added (linkat, symlinkat, > >>> mknodat) mainly to keep things uniform internally (in namei.c), and > >>> with things changed in namei.c adding support for these operations to > >>> io_uring is trivial, so that was done too. See > >>> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ > >> > >> Ping. Jens, are we waiting for the audit change to be merged before this > >> can go in? > > > > Not necessarily, as that should go in for 5.14 anyway. > > > > Al, are you OK with the generic changes? > > I have tentatively queued this up. Hey Dmitry, hey Jens, The additional op codes and suggested rework is partially on me. So I should share the blame in case this gets a NAK: Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
On Mon, Jun 21, 2021 at 10:21 PM Jens Axboe <axboe@kernel.dk> wrote: > > I have tentatively queued this up. Tentative "woohoo!"
On Tue, Jun 22, 2021 at 3:12 PM Christian Brauner <christian.brauner@ubuntu.com> wrote: > > On Mon, Jun 21, 2021 at 09:21:23AM -0600, Jens Axboe wrote: > > On 6/18/21 10:10 AM, Jens Axboe wrote: > > > On 6/18/21 12:24 AM, Dmitry Kadashev wrote: > > >> On Thu, Jun 3, 2021 at 12:18 PM Dmitry Kadashev <dkadashev@gmail.com> wrote: > > >>> > > >>> This started out as an attempt to add mkdirat support to io_uring which > > >>> is heavily based on renameat() / unlinkat() support. > > >>> > > >>> During the review process more operations were added (linkat, symlinkat, > > >>> mknodat) mainly to keep things uniform internally (in namei.c), and > > >>> with things changed in namei.c adding support for these operations to > > >>> io_uring is trivial, so that was done too. See > > >>> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ > > >> > > >> Ping. Jens, are we waiting for the audit change to be merged before this > > >> can go in? > > > > > > Not necessarily, as that should go in for 5.14 anyway. > > > > > > Al, are you OK with the generic changes? > > > > I have tentatively queued this up. > > Hey Dmitry, > hey Jens, > > The additional op codes and suggested rework is partially on me. So I > should share the blame in case this gets a NAK: > > Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Hi Christian, Thank you very much for your help with this! Just wanted to say that you were quite supportive and really helped me a lot.
On 6/3/21 6:18 AM, Dmitry Kadashev wrote: > This started out as an attempt to add mkdirat support to io_uring which > is heavily based on renameat() / unlinkat() support. > > During the review process more operations were added (linkat, symlinkat, > mknodat) mainly to keep things uniform internally (in namei.c), and > with things changed in namei.c adding support for these operations to > io_uring is trivial, so that was done too. See > https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ io_uring part looks good in general, just small comments. However, I believe we should respin it, because there should be build problems in the middle. > The first patch is preparation with no functional changes, makes > do_mkdirat accept struct filename pointer rather than the user string. > > The second one leverages that to implement mkdirat in io_uring. > > 3-6 just convert other similar do_* functions in namei.c to accept > struct filename, for uniformity with do_mkdirat, do_renameat and > do_unlinkat. No functional changes there. > > 7 changes do_* helpers in namei.c to return ints rather than some of > them returning ints and some longs. > > 8-10 add symlinkat, linkat and mknodat support to io_uring > (correspondingly). > > Based on for-5.14/io_uring. > > v5: > - rebase > - add symlinkat, linkat and mknodat support to io_uring > > v4: > - update do_mknodat, do_symlinkat and do_linkat to accept struct > filename for uniformity with do_mkdirat, do_renameat and do_unlinkat; > > v3: > - rebase; > > v2: > - do not mess with struct filename's refcount in do_mkdirat, instead add > and use __filename_create() that does not drop the name on success; > > > Dmitry Kadashev (10): > fs: make do_mkdirat() take struct filename > io_uring: add support for IORING_OP_MKDIRAT > fs: make do_mknodat() take struct filename > fs: make do_symlinkat() take struct filename > namei: add getname_uflags() > fs: make do_linkat() take struct filename > fs: update do_*() helpers to return ints > io_uring: add support for IORING_OP_SYMLINKAT > io_uring: add support for IORING_OP_LINKAT > io_uring: add support for IORING_OP_MKNODAT > > fs/exec.c | 8 +- > fs/internal.h | 10 +- > fs/io_uring.c | 240 ++++++++++++++++++++++++++++++++++ > fs/namei.c | 137 ++++++++++++------- > include/linux/fs.h | 1 + > include/uapi/linux/io_uring.h | 6 + > 6 files changed, 349 insertions(+), 53 deletions(-) >
On 6/22/21 5:56 AM, Pavel Begunkov wrote: > On 6/3/21 6:18 AM, Dmitry Kadashev wrote: >> This started out as an attempt to add mkdirat support to io_uring which >> is heavily based on renameat() / unlinkat() support. >> >> During the review process more operations were added (linkat, symlinkat, >> mknodat) mainly to keep things uniform internally (in namei.c), and >> with things changed in namei.c adding support for these operations to >> io_uring is trivial, so that was done too. See >> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ > > io_uring part looks good in general, just small comments. However, I > believe we should respin it, because there should be build problems > in the middle. I can drop it, if Dmitry wants to respin. I do think that we could easily drop mknodat and not really lose anything there, better to reserve the op for something a bit more useful.
On 6/22/21 2:12 AM, Christian Brauner wrote: > On Mon, Jun 21, 2021 at 09:21:23AM -0600, Jens Axboe wrote: >> On 6/18/21 10:10 AM, Jens Axboe wrote: >>> On 6/18/21 12:24 AM, Dmitry Kadashev wrote: >>>> On Thu, Jun 3, 2021 at 12:18 PM Dmitry Kadashev <dkadashev@gmail.com> wrote: >>>>> >>>>> This started out as an attempt to add mkdirat support to io_uring which >>>>> is heavily based on renameat() / unlinkat() support. >>>>> >>>>> During the review process more operations were added (linkat, symlinkat, >>>>> mknodat) mainly to keep things uniform internally (in namei.c), and >>>>> with things changed in namei.c adding support for these operations to >>>>> io_uring is trivial, so that was done too. See >>>>> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ >>>> >>>> Ping. Jens, are we waiting for the audit change to be merged before this >>>> can go in? >>> >>> Not necessarily, as that should go in for 5.14 anyway. >>> >>> Al, are you OK with the generic changes? >> >> I have tentatively queued this up. > > Hey Dmitry, > hey Jens, > > The additional op codes and suggested rework is partially on me. So I > should share the blame in case this gets a NAK: > > Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Thanks Christian!
On 6/22/21 6:26 PM, Jens Axboe wrote: > On 6/22/21 5:56 AM, Pavel Begunkov wrote: >> On 6/3/21 6:18 AM, Dmitry Kadashev wrote: >>> This started out as an attempt to add mkdirat support to io_uring which >>> is heavily based on renameat() / unlinkat() support. >>> >>> During the review process more operations were added (linkat, symlinkat, >>> mknodat) mainly to keep things uniform internally (in namei.c), and >>> with things changed in namei.c adding support for these operations to >>> io_uring is trivial, so that was done too. See >>> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ >> >> io_uring part looks good in general, just small comments. However, I >> believe we should respin it, because there should be build problems >> in the middle. > > I can drop it, if Dmitry wants to respin. I do think that we could > easily drop mknodat and not really lose anything there, better to > reserve the op for something a bit more useful. I can try it and send a fold in, if you want. Other changes may be on top
On 6/22/21 11:28 AM, Pavel Begunkov wrote: > On 6/22/21 6:26 PM, Jens Axboe wrote: >> On 6/22/21 5:56 AM, Pavel Begunkov wrote: >>> On 6/3/21 6:18 AM, Dmitry Kadashev wrote: >>>> This started out as an attempt to add mkdirat support to io_uring which >>>> is heavily based on renameat() / unlinkat() support. >>>> >>>> During the review process more operations were added (linkat, symlinkat, >>>> mknodat) mainly to keep things uniform internally (in namei.c), and >>>> with things changed in namei.c adding support for these operations to >>>> io_uring is trivial, so that was done too. See >>>> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ >>> >>> io_uring part looks good in general, just small comments. However, I >>> believe we should respin it, because there should be build problems >>> in the middle. >> >> I can drop it, if Dmitry wants to respin. I do think that we could >> easily drop mknodat and not really lose anything there, better to >> reserve the op for something a bit more useful. > > I can try it and send a fold in, if you want. > Other changes may be on top Sure that works too, will rebase in any case, and I'd like to add Christian's ack as well. I'll just re-apply with the fold-ins.
On Tue, Jun 22, 2021 at 6:56 PM Pavel Begunkov <asml.silence@gmail.com> wrote: > > On 6/3/21 6:18 AM, Dmitry Kadashev wrote: > > This started out as an attempt to add mkdirat support to io_uring which > > is heavily based on renameat() / unlinkat() support. > > > > During the review process more operations were added (linkat, symlinkat, > > mknodat) mainly to keep things uniform internally (in namei.c), and > > with things changed in namei.c adding support for these operations to > > io_uring is trivial, so that was done too. See > > https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ > > io_uring part looks good in general, just small comments. However, I > believe we should respin it, because there should be build problems > in the middle. I knew my celebration was premature! :)
On Wed, Jun 23, 2021 at 12:32 AM Jens Axboe <axboe@kernel.dk> wrote: > > On 6/22/21 11:28 AM, Pavel Begunkov wrote: > > On 6/22/21 6:26 PM, Jens Axboe wrote: > >> On 6/22/21 5:56 AM, Pavel Begunkov wrote: > >>> On 6/3/21 6:18 AM, Dmitry Kadashev wrote: > >>>> This started out as an attempt to add mkdirat support to io_uring which > >>>> is heavily based on renameat() / unlinkat() support. > >>>> > >>>> During the review process more operations were added (linkat, symlinkat, > >>>> mknodat) mainly to keep things uniform internally (in namei.c), and > >>>> with things changed in namei.c adding support for these operations to > >>>> io_uring is trivial, so that was done too. See > >>>> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ > >>> > >>> io_uring part looks good in general, just small comments. However, I > >>> believe we should respin it, because there should be build problems > >>> in the middle. > >> > >> I can drop it, if Dmitry wants to respin. I do think that we could > >> easily drop mknodat and not really lose anything there, better to > >> reserve the op for something a bit more useful. > > > > I can try it and send a fold in, if you want. > > Other changes may be on top > > Sure that works too, will rebase in any case, and I'd like to add > Christian's ack as well. I'll just re-apply with the fold-ins. Thanks Jens and Pavel, I'll process the comments and will send a follow-up patchset.
On Wed, Jun 23, 2021 at 12:32 AM Jens Axboe <axboe@kernel.dk> wrote: > > On 6/22/21 11:28 AM, Pavel Begunkov wrote: > > On 6/22/21 6:26 PM, Jens Axboe wrote: > >> On 6/22/21 5:56 AM, Pavel Begunkov wrote: > >>> On 6/3/21 6:18 AM, Dmitry Kadashev wrote: > >>>> This started out as an attempt to add mkdirat support to io_uring which > >>>> is heavily based on renameat() / unlinkat() support. > >>>> > >>>> During the review process more operations were added (linkat, symlinkat, > >>>> mknodat) mainly to keep things uniform internally (in namei.c), and > >>>> with things changed in namei.c adding support for these operations to > >>>> io_uring is trivial, so that was done too. See > >>>> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ > >>> > >>> io_uring part looks good in general, just small comments. However, I > >>> believe we should respin it, because there should be build problems > >>> in the middle. > >> > >> I can drop it, if Dmitry wants to respin. I do think that we could > >> easily drop mknodat and not really lose anything there, better to > >> reserve the op for something a bit more useful. > > > > I can try it and send a fold in, if you want. > > Other changes may be on top > > Sure that works too, will rebase in any case, and I'd like to add > Christian's ack as well. I'll just re-apply with the fold-ins. Jens, it seems that during this rebase you've accidentally squashed the "fs: update do_*() helpers to return ints" and "io_uring: add support for IORING_OP_SYMLINKAT" commits, so there is only the former one in your tree, but it actually adds the SYMLINKAT opcode to io uring (in addition to changing the helpers return types).
On 6/22/21 11:35 PM, Dmitry Kadashev wrote: > On Tue, Jun 22, 2021 at 6:56 PM Pavel Begunkov <asml.silence@gmail.com> wrote: >> >> On 6/3/21 6:18 AM, Dmitry Kadashev wrote: >>> This started out as an attempt to add mkdirat support to io_uring which >>> is heavily based on renameat() / unlinkat() support. >>> >>> During the review process more operations were added (linkat, symlinkat, >>> mknodat) mainly to keep things uniform internally (in namei.c), and >>> with things changed in namei.c adding support for these operations to >>> io_uring is trivial, so that was done too. See >>> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ >> >> io_uring part looks good in general, just small comments. However, I >> believe we should respin it, because there should be build problems >> in the middle. > > I knew my celebration was premature! :) It's all good, just respin with the requested fixes :-)
On 6/22/21 11:49 PM, Dmitry Kadashev wrote: > On Wed, Jun 23, 2021 at 12:32 AM Jens Axboe <axboe@kernel.dk> wrote: >> >> On 6/22/21 11:28 AM, Pavel Begunkov wrote: >>> On 6/22/21 6:26 PM, Jens Axboe wrote: >>>> On 6/22/21 5:56 AM, Pavel Begunkov wrote: >>>>> On 6/3/21 6:18 AM, Dmitry Kadashev wrote: >>>>>> This started out as an attempt to add mkdirat support to io_uring which >>>>>> is heavily based on renameat() / unlinkat() support. >>>>>> >>>>>> During the review process more operations were added (linkat, symlinkat, >>>>>> mknodat) mainly to keep things uniform internally (in namei.c), and >>>>>> with things changed in namei.c adding support for these operations to >>>>>> io_uring is trivial, so that was done too. See >>>>>> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ >>>>> >>>>> io_uring part looks good in general, just small comments. However, I >>>>> believe we should respin it, because there should be build problems >>>>> in the middle. >>>> >>>> I can drop it, if Dmitry wants to respin. I do think that we could >>>> easily drop mknodat and not really lose anything there, better to >>>> reserve the op for something a bit more useful. >>> >>> I can try it and send a fold in, if you want. >>> Other changes may be on top >> >> Sure that works too, will rebase in any case, and I'd like to add >> Christian's ack as well. I'll just re-apply with the fold-ins. > > Jens, it seems that during this rebase you've accidentally squashed the > "fs: update do_*() helpers to return ints" and > "io_uring: add support for IORING_OP_SYMLINKAT" commits, so there is only the > former one in your tree, but it actually adds the SYMLINKAT opcode to io uring > (in addition to changing the helpers return types). Man, I wonder what happened there. I'll just drop the series, so when you resend this one (hopefully soon if it's for 5.14...), just make it against the current branch.
On Thu, Jun 24, 2021 at 9:37 AM Jens Axboe <axboe@kernel.dk> wrote: > > On 6/22/21 11:49 PM, Dmitry Kadashev wrote: > > > > Jens, it seems that during this rebase you've accidentally squashed the > > "fs: update do_*() helpers to return ints" and > > "io_uring: add support for IORING_OP_SYMLINKAT" commits, so there is only the > > former one in your tree, but it actually adds the SYMLINKAT opcode to io uring > > (in addition to changing the helpers return types). > > Man, I wonder what happened there. I'll just drop the series, so when you > resend this one (hopefully soon if it's for 5.14...), just make it > against the current branch. Sure, I'll send v6 shortly
On Tue, Jun 22, 2021 at 03:34:37PM +0700, Dmitry Kadashev wrote: > On Tue, Jun 22, 2021 at 3:12 PM Christian Brauner > <christian.brauner@ubuntu.com> wrote: > > > > On Mon, Jun 21, 2021 at 09:21:23AM -0600, Jens Axboe wrote: > > > On 6/18/21 10:10 AM, Jens Axboe wrote: > > > > On 6/18/21 12:24 AM, Dmitry Kadashev wrote: > > > >> On Thu, Jun 3, 2021 at 12:18 PM Dmitry Kadashev <dkadashev@gmail.com> wrote: > > > >>> > > > >>> This started out as an attempt to add mkdirat support to io_uring which > > > >>> is heavily based on renameat() / unlinkat() support. > > > >>> > > > >>> During the review process more operations were added (linkat, symlinkat, > > > >>> mknodat) mainly to keep things uniform internally (in namei.c), and > > > >>> with things changed in namei.c adding support for these operations to > > > >>> io_uring is trivial, so that was done too. See > > > >>> https://lore.kernel.org/io-uring/20210514145259.wtl4xcsp52woi6ab@wittgenstein/ > > > >> > > > >> Ping. Jens, are we waiting for the audit change to be merged before this > > > >> can go in? > > > > > > > > Not necessarily, as that should go in for 5.14 anyway. > > > > > > > > Al, are you OK with the generic changes? > > > > > > I have tentatively queued this up. > > > > Hey Dmitry, > > hey Jens, > > > > The additional op codes and suggested rework is partially on me. So I > > should share the blame in case this gets a NAK: > > > > Acked-by: Christian Brauner <christian.brauner@ubuntu.com> > > Hi Christian, > > Thank you very much for your help with this! Just wanted to say that you > were quite supportive and really helped me a lot. Hey Dmitry, Thank you for saying that! Much appreciated. Thanks for working on this! Christian