Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3474201ybb; Mon, 6 Apr 2020 09:36:11 -0700 (PDT) X-Google-Smtp-Source: APiQypLKcNZVVZNyJdIEFgCejVmpBGTejq8l+pW46EYxvu3VDGS3FQroCtufv7uEh2+BQlvm+2Ob X-Received: by 2002:a05:6830:1348:: with SMTP id r8mr17527421otq.57.1586190971198; Mon, 06 Apr 2020 09:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586190971; cv=none; d=google.com; s=arc-20160816; b=v33fODL07QlRGV+qGgKgRYjYPS/0LAq14ThKkHUtXiA/Bzk210arF1k6w5ec5F2pOm 32AJlmvF4F/jH433EwfRoDy4Dx+wbjftT6+zZwBuSrH/Goei73LQs7ErRyJ1TjVZCcs1 5LNv6AjZDPIrIo/Cxv9Xg7sCXqDx+0DxvlkLyKSDvjkP0LUd7lTX4NIXJK7MaI7OC01x YTbktocnS9x7Y0z/UwfOEJGJWTZS2CQMJHH8kS7dW1dCrc9mfom4Eza/xuHBEhAtKX3m AHIKsQL9ZA7LRf/XlKgSUYOT/c3/TJfz5rlIl4jVzstvQ19qr5Y/MabwC4DzEm4mHaFg 0SLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fMHiT/Wub3WobBASn8jTrpUwrDr3u4OoR64hK8bb9Ks=; b=tuIo1G+/+clHJqkkylEgmUYfKERbUVtFtu0czV0ETRXU3yYZ/d6pcyFIpiFSdHYOCu 0L67PRBJvyPWelZGyjbSv8iyRgZsWzIGLxrOE7p/dCCb5yfnoGIzmHp/+8gpQ117lthP YCM9rdVbCdjh8CZ7/FjAd8CxiEhe0Dq952tn2mNBzRTMA1mZjDga655wIkmCJ2/HuUwR zt8+i1wzJbzha5GZIelcYtW/xQuRBioZiT88BWWtl+AfFRL79QcmkY8SAybWcWBDzUi7 b5JjwbdEDt37she4lv58HBXA/rrQkqK5g1piMylwT1KH6Avd9MoiD5sRQWx8Q/+Sz/9L ifSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=AfWDLI+z; 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 94si33316otc.25.2020.04.06.09.35.56; Mon, 06 Apr 2020 09:36:11 -0700 (PDT) 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=@linux-foundation.org header.s=google header.b=AfWDLI+z; 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 S1729435AbgDFQec (ORCPT + 99 others); Mon, 6 Apr 2020 12:34:32 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:41436 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728789AbgDFQec (ORCPT ); Mon, 6 Apr 2020 12:34:32 -0400 Received: by mail-lj1-f193.google.com with SMTP id n17so336305lji.8 for ; Mon, 06 Apr 2020 09:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fMHiT/Wub3WobBASn8jTrpUwrDr3u4OoR64hK8bb9Ks=; b=AfWDLI+z1soflaJhqnVIBl+g08ryFIMdzJqIJa45tvPYBFyKn+PmZgyAKpbs5cJwZl 9gtU1jadiJkYAbncJSZUPSb1X2kcckqoo15hGsCWmJf/qxcwWTHrb5wLDAA7sDdZ3t6B sFkeB7u4W8ywdCcWyLji2espSviyDN/+Gi3rc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fMHiT/Wub3WobBASn8jTrpUwrDr3u4OoR64hK8bb9Ks=; b=k7LXqXdE3qpmlfmYfNlUxViXkCYxhm2tmlFPjoZJpX+qF7SjxHF6OEe4tP/gkVSC9g HUHk4+HATYUGXSJS09GoyoE9fNsSjJGhWA2Td4nWljbP49svEm/E4N2R3vs02IsJWiUY 5Q3QV7H/48Al+rSsYRP66aHTa0t5xwm9b1B9IN3Td6mdI8r51S04VxIPg/Ey6qRLlues W6KnI46Jbsa12NvckUDC0R/T/+DZI7J3sorIxZYdiZIFcpI7f1XVhVOtivMJ+ARDCbwT 6yuzwrdFVmtFWk8RC8qt7ZTj8f1NT8nkGelHrNe4mXXXkAlxoMwwVaaEZbGt7r2Bd6A3 w0GA== X-Gm-Message-State: AGi0PuZWc+zmszRJGL2EBonFIDYzWQP4mZmFOczV2ojLbP0EwD+OO/kg pT1/2BL6rU5k0y/1Xci5KfDyHM4vkDo= X-Received: by 2002:a2e:b52f:: with SMTP id z15mr80980ljm.38.1586190867919; Mon, 06 Apr 2020 09:34:27 -0700 (PDT) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com. [209.85.167.42]) by smtp.gmail.com with ESMTPSA id m8sm10264897lji.12.2020.04.06.09.34.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Apr 2020 09:34:26 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id w145so9649lff.3 for ; Mon, 06 Apr 2020 09:34:25 -0700 (PDT) X-Received: by 2002:a19:7706:: with SMTP id s6mr10019987lfc.31.1586190864915; Mon, 06 Apr 2020 09:34:24 -0700 (PDT) MIME-Version: 1.0 References: <2590640.1585757211@warthog.procyon.org.uk> <36e45eae8ad78f7b8889d9d03b8846e78d735d28.camel@themaw.net> <27994c53034c8f769ea063a54169317c3ee62c04.camel@themaw.net> <20200403111144.GB34663@gardel-login> <20200403151223.GB34800@gardel-login> <20200403203024.GB27105@fieldses.org> <20200406091701.q7ctdek2grzryiu3@ws.net.home> In-Reply-To: <20200406091701.q7ctdek2grzryiu3@ws.net.home> From: Linus Torvalds Date: Mon, 6 Apr 2020 09:34:08 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Upcoming: Notifications, FS notifications and fsinfo() To: Karel Zak Cc: "J. Bruce Fields" , Lennart Poettering , Miklos Szeredi , Ian Kent , David Howells , Christian Brauner , Al Viro , dray@redhat.com, Miklos Szeredi , Steven Whitehouse , Jeff Layton , andres@anarazel.de, keyrings@vger.kernel.org, linux-fsdevel , Linux Kernel Mailing List , Aleksa Sarai Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 6, 2020 at 2:17 AM Karel Zak wrote: > > On Fri, Apr 03, 2020 at 04:30:24PM -0400, J. Bruce Fields wrote: > > > > nfs-utils/support/misc/mountpoint.c:check_is_mountpoint() stats the file > > and ".." and returns true if they have different st_dev or the same > > st_ino. Comparing mount ids sounds better. > > BTW, this traditional st_dev+st_ino way is not reliable for bind mounts. > For mountpoint(1) we search the directory in /proc/self/mountinfo. These days you should probably use openat2() with RESOLVE_NO_XDEV. No need for any mountinfo or anything like that. Just look up the pathname and say "don't cross mount-points", and you'll get an error if it's a mount crossing lookup. So this kind of thing is _not_ an argument for another kernel querying interface. We got a new (and better) model for a lot of this. Linus