Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1278045pxb; Tue, 17 Aug 2021 08:00:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6VVTs/nekzsa6fC9c49gOMA9K47Uh3Bx1YlvycMRLfmI68yczkA5xxQCpTnzb1W2rF7Vb X-Received: by 2002:a02:aa96:: with SMTP id u22mr3340643jai.9.1629212426908; Tue, 17 Aug 2021 08:00:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629212426; cv=none; d=google.com; s=arc-20160816; b=tCJU7eGyOvxou4AwE1eqc3sakrE6bWAe2a5k3bV2S300SvsZEQMSlIK3L+FOHZBZvh MRmhw5lyU4qUPs+La2639p4fjZYpH8Xmjsk9lSINhEZ7bXJtpZzwcOViXOKkX6hYHgYA EkNykxnnYqw2/CrrGuCNlUexRLd1oOPHimKQT5CkfHXl2VUJQWh65PTWHlxm4X3OX5RU zLeWL95uIAMe/AQqnWrp2hhtTFAGuWxX7HoRWf09ARpvpdQONGVCDjPb9FawBP+Ca+NJ mT1nAgujZZk/oDaElzBEOnWm7COpm464MXjabylKxOPec/qCDKU/BT8sXXgJLa5aWfTt x5fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=1HdHdFgWWG16f4VwNP1gm3a1IOgD0fTv+SrBh0by7IQ=; b=XfT2/vAkeRtIZRXdVpjI5CjsV90rPs/XywWgBubOgrf2Iu1zzXLHVH6IPjWCYSxp78 Wf4y+fI8MfkzcpLBmLlipZAR47ERbatbhwk/O/F1BaLCQennEHLNcIqnK8OXiBwVPZ4y F9CO3ZiH3Kxzdr+4y+RAAMhsIRh+m77hJJUx02Wn5wZGGeqig/hIgL9/5RJQHIIcGnIY SLh0Gh6ER6bCdSEzTzFG3n9UaGip8nm+xNndSuxpusBxNqUtiIrFcFqluSDBHoPVK7Wr 7ec5NlXnzHqt8Mx4bgp15OjxPvq+K4ML6qIwv9WLKdsGRke7LKoj6anfSY5OOx0rReBN 10AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="kIWcguE/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si2568937ilq.96.2021.08.17.07.59.56; Tue, 17 Aug 2021 08:00:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="kIWcguE/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240082AbhHQO5u (ORCPT + 99 others); Tue, 17 Aug 2021 10:57:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232705AbhHQO5t (ORCPT ); Tue, 17 Aug 2021 10:57:49 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04178C061764 for ; Tue, 17 Aug 2021 07:57:16 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id qe12-20020a17090b4f8c00b00179321cbae7so6784019pjb.2 for ; Tue, 17 Aug 2021 07:57:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=1HdHdFgWWG16f4VwNP1gm3a1IOgD0fTv+SrBh0by7IQ=; b=kIWcguE/I/iMCvSQVpeRfXxGl+9A/JDtLbRLkJ78gUb4+3IGvFXFEISYOyD0qtOoQw PlcIeo5TMWaWuqqIJv0rLLYW5hfNDtC2CFas4gi7MX0tmJWmg6lv2bUGwhA3NAcRCTZ4 FNPpuWsl4pTjOPGM0iJsazx0F13+msWdp19otXXzaHQtBrsbMW2CtF1GfA/+91iWF1En 83/qwC6pJWPlaH4cgixns7cYJxT9Kdd42q87YiP/sZZcO/rbqrXs/+KkW3Er3o16MIlH fT585xGuubJpw3LigCirvwB2mcq0XpKqqlLYUu9zAmsBJTHD+t8N88xI0Nmd0k6VoCVL tTYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1HdHdFgWWG16f4VwNP1gm3a1IOgD0fTv+SrBh0by7IQ=; b=f+vLaerDD6L9sPVAotselHl1Gw2cEkHSvrlnRzn5S0o8DML5Nmv09K7A8aYkpqKoW8 bX/3zMgW+f5PAGILG4p7XvunsQ9Os+mX6ki5Pja3JHzjkVv+HVCZe8CNjxFCciEWHk04 ZvJxHQw+lswI2iCNA+QgOFdMyjqYqmAnc/jkP5Zf+xjixyAKgwLX5/k2+0lJlVVIXL80 MTCqChEgvP1j57eLe9xftMuD3QvQD1Pqaz7nLgp0ctJwxbeXEwCcXR+Z97zUeUHJMOSl RfNB313C8uX7Uhgbi+4k3/EfPpuRjDjMb2HXvq2yLNrua2AwCtjJWnTGn30PQaSn+Imk oXUg== X-Gm-Message-State: AOAM531XGOYb+tlVY4XiiNIeDCSVHeKO0kJm8VjWoakCZtB2jkxw3N73 Ao8mvPAsPA56Bo96DjdpZU93pg== X-Received: by 2002:a17:90a:1616:: with SMTP id n22mr4140488pja.141.1629212235318; Tue, 17 Aug 2021 07:57:15 -0700 (PDT) Received: from [192.168.1.116] ([66.219.217.159]) by smtp.gmail.com with ESMTPSA id r3sm2909972pff.119.2021.08.17.07.57.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Aug 2021 07:57:14 -0700 (PDT) Subject: Re: [PATCH v2 0/4] open/accept directly into io_uring fixed file table To: Pavel Begunkov , Stefan Metzmacher , io-uring@vger.kernel.org, Josh Triplett Cc: "David S . Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: <17841c48-093e-af1c-c7c9-aa00859eb1b9@samba.org> <78e2d63a-5d3a-6334-8177-11646d4ec261@gmail.com> From: Jens Axboe Message-ID: Date: Tue, 17 Aug 2021 08:57:13 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <78e2d63a-5d3a-6334-8177-11646d4ec261@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/17/21 3:33 AM, Pavel Begunkov wrote: > On 8/16/21 4:45 PM, Stefan Metzmacher wrote: >> Hi Pavel, >> >>> The behaviour is controlled by setting sqe->file_index, where 0 implies >>> the old behaviour. If non-zero value is specified, then it will behave >>> as described and place the file into a fixed file slot >>> sqe->file_index - 1. A file table should be already created, the slot >>> should be valid and empty, otherwise the operation will fail. >>> >>> Note 1: we can't use IOSQE_FIXED_FILE to switch between modes, because >>> accept takes a file, and it already uses the flag with a different >>> meaning. >> >> Would it be hard to support IOSQE_FIXED_FILE for the dirfd of openat*, renameat, unlinkat, statx? >> (And mkdirat, linkat, symlinkat when they arrive) >> renameat and linkat might be trickier as they take two dirfds, but it >> would make the feature more complete and useful. > > Good idea. There is nothing blocking on the io_uring side, but > the fs part may get ugly, e.g. too intrusive. We definitely need > to take a look Indeed, the io_uring side is trivial, but the VFS interface would require a lot of man handling... That's why I didn't add support for fixed files originally. -- Jens Axboe