From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99861C3F2C6 for ; Tue, 3 Mar 2020 19:23:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 708E02072D for ; Tue, 3 Mar 2020 19:23:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="cUtFbLLA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730786AbgCCTXV (ORCPT ); Tue, 3 Mar 2020 14:23:21 -0500 Received: from mail-il1-f194.google.com ([209.85.166.194]:42832 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729458AbgCCTXU (ORCPT ); Tue, 3 Mar 2020 14:23:20 -0500 Received: by mail-il1-f194.google.com with SMTP id x2so3794286ila.9 for ; Tue, 03 Mar 2020 11:23:19 -0800 (PST) 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=KiZbLVn4oUdQq37v8gihe8HTdDkjhp2c0YGGCKWw9Xs=; b=cUtFbLLAYh6gx9tm2hX9XXTHNvQbYYtQzHRgoECvT1iNpNhnaqHdzCG/CIyEeLM4gL Z1ePPKxytHV6jrshCuDSCg/F/Y3EhjB789IMGMhvLY5BjMF12XYa9P1fenpGS3wnUpiq 2ub+HBTb161Oel2xhswKj/mAZyHisH25WZK9vbaxjY6LTd9Hw0LO3CFy6e1A4xK6Rp8h B5RYOBiOga3ZtJu6UFkd/mh/wq7qjfsVdp483vXbAO26p9+WfSM398uJZlbzilANoMKh Fc8hK9CXNYQpui0/BpLv6RVXEYpV8KRigcO4x7aUkA1YZ0R/2aAWKkiiGy9dpnCH8Mco ACqA== 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=KiZbLVn4oUdQq37v8gihe8HTdDkjhp2c0YGGCKWw9Xs=; b=e8cMvucM9A2KfCq1kzF46y9m2ithTBhXZHAea10yKBn1lkp3ZlVola8QFFYnhGbcSb RhKCf4x5UJf7NJFUE/5Rd1OPm51v24l1Yttc3VQLPsfiIPgnTnjEOczFb2vmubb72zCR hP2LTHxhX7d4/kQswpG8m9HsSRyP4Doi9olDbyR/S6TcQ2EVvEU/pDRCPKUByPWOS+Yf JnoArjo3y3+IwMVSe3Gt81lc5mZMCkO/QBOAIUFncL1KMrZauxwkOGUb+JZTA95t2CwK mnKYU4kRlaL6OsjvspX3zuV0a3aR3oYRL+uedg6FrqpFWmn/12dnlRM8LqL0SoUtEVdD jgLg== X-Gm-Message-State: ANhLgQ2EGmX8fxbn/YH4LLzddW/5c+6vIO+bkTSRg3NMNzdBU7DSpDc/ WgOtUM64AYP+91eedf6H1GYLKPFxx/Y= X-Google-Smtp-Source: ADFU+vsGYrEKxsUpTqs5b+dGZi3gm2OTFxMN1tCOScyWlCXapZO1C3KKgpKNsVOR0wDn9xAFuJJT4A== X-Received: by 2002:a92:9507:: with SMTP id y7mr1729545ilh.243.1583263398611; Tue, 03 Mar 2020 11:23:18 -0800 (PST) Received: from [192.168.1.159] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id f72sm8161736ilg.84.2020.03.03.11.23.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Mar 2020 11:23:18 -0800 (PST) Subject: Re: [PATCH 00/17] VFS: Filesystem information and notifications [ver #17] To: Jeff Layton , Greg Kroah-Hartman , Jann Horn Cc: Miklos Szeredi , Karel Zak , David Howells , Ian Kent , Christian Brauner , James Bottomley , Steven Whitehouse , Miklos Szeredi , viro , Christian Brauner , "Darrick J. Wong" , Linux API , linux-fsdevel , lkml References: <1509948.1583226773@warthog.procyon.org.uk> <20200303113814.rsqhljkch6tgorpu@ws.net.home> <20200303130347.GA2302029@kroah.com> <20200303131434.GA2373427@kroah.com> <20200303134316.GA2509660@kroah.com> <20200303141030.GA2811@kroah.com> <20200303142407.GA47158@kroah.com> <030888a2-db3e-919d-d8ef-79dcc10779f9@kernel.dk> <7a05adc8-1ca9-c900-7b24-305f1b3a9b86@kernel.dk> From: Jens Axboe Message-ID: Date: Tue, 3 Mar 2020 12:23:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/3/20 12:02 PM, Jeff Layton wrote: > Basically, all you'd need to do is keep a pointer to struct file in the > internal state for the chain. Then, allow userland to specify some magic > fd value for subsequent chained operations that says to use that instead > of consulting the fdtable. Maybe use -4096 (-MAX_ERRNO - 1)? BTW, I think we need two magics here. One that says "result from previous is fd for next", and one that says "fd from previous is fd for next". The former allows inheritance from open -> read, the latter from read -> write. -- Jens Axboe