Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3829424ybf; Tue, 3 Mar 2020 13:42:35 -0800 (PST) X-Google-Smtp-Source: ADFU+vuipfWlmDXR9jgRqjAxHYekCPako0wG3lm8jV/2zWs6wm3iKGlgM/wwvjIusFQA6Lh4j511 X-Received: by 2002:aca:cd0e:: with SMTP id d14mr384363oig.167.1583271755225; Tue, 03 Mar 2020 13:42:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583271755; cv=none; d=google.com; s=arc-20160816; b=DUGGzBxnhEEQ6sf8Z9pSGeiSot2+tcjBL5MiAgw15qS7mdPWGyZK2TQacSHqO6JZEZ YIOxURm8GT+IJBHunlVw92jSWl68lf9dJIwELh2FB48nI32Kh5owmRpuXHOsYnGL3BV5 2lvXOgetLLqShEmD9VPhG4l2hcM0tH2ZdYx5zC+VmUJBrjurz4SZxPRFAtqywD1dCGxq rgYy/fe79WFNqEX3A7Uxz4bFTFbUUXs0ny9T/0fov+P7LvQiZGQVCWqucaHZ6DoXakcx 4WoerXCRUGh/je2FC6CoVsby7hNql0DjzF7fogFexEYYwvEoAWfxOZrqcHsWkStvAm34 Dynw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=KiZbLVn4oUdQq37v8gihe8HTdDkjhp2c0YGGCKWw9Xs=; b=LgOVZI8b8F4/Xo/i7XZRxvC2ZKu3SRb2Vfa9SsUQYkqDR1oZAURVTAUqq7hfAwMmIO a9fQFBY47KJPSfSjBaREwzAFAgvagXl/JeTbYGElr3L0U6ezJ70+mN6UvukLq1qWm64N Mi9nJ6SXE1v0BhLK1QTwo40skMc0QtgftNLFPAxpiyWXe9VJRinXtZjYF11rxgThvFGv UjAP0ErJFbTMRlTxzFMBw6pUSlc3GFJKDhFRyxNONEhMrRksLQ8hUuLPGCQPykETvayk L/Xdjfr2RVxg/Lilz74uYlf9kdi+eUNebBbVwlttL13FOiJHnOiilCa9KV/ZQYlzejlO qPYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=cUtFbLLA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j22si25260oib.137.2020.03.03.13.42.23; Tue, 03 Mar 2020 13:42:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=cUtFbLLA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730461AbgCCTXV (ORCPT + 99 others); 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-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