Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp371780ybb; Fri, 3 Apr 2020 04:26:57 -0700 (PDT) X-Google-Smtp-Source: APiQypKDMBTCbakrGkRwMcpzkXVl47ZBpMsrFiIwRKHxTrH5GHNLVYHrBZF4ofW1FDRlfP0da1dU X-Received: by 2002:a9d:6ad8:: with SMTP id m24mr6039746otq.66.1585913217623; Fri, 03 Apr 2020 04:26:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585913217; cv=none; d=google.com; s=arc-20160816; b=Gw/dG93jUZ4NACIfSxq2TVSJ/A43oaDtNHNXeuz4i5i63Hwi7iPVcHmOsimFDt2meV b9uN+NQXcjEFOyamsvoIwibJb9m68vX5tTxMrvAWb+aeeNsN8ryn5POhyhL7qoLhmhC4 689VK3SIQMLehuhoncY+982DWG6bCJlH8KRa9iw8ZIpUqq8lpsEAedNtYJkZ9NQZAAq/ gspXuOxxxvQA/WgfKQai50ArhTS7pEFY2oJg1geYCBj0Id6IL/mru8mCaurvRQUgFuN/ zwU5VWWabdCwrIvhD+IZTtYLiG18jvuPQZZn3/WwhRBU1j8IW3UMJGWgbZewfE7+y/TQ olMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=vihE+aqafF0I0FJ+/P8XbzLo564cBorfTumr3/HvAoo=; b=MDtx1oW8Yiw/GgMm/eSFLUm7ul228fDupppIw3igUhF8lsIugWjRt9PchOzM49RQb+ p38pnBu09kUeC0IPdKXKIq2LuLPIEsxiGCWJI1sDUiGOrr+s5K6DQ7TRSlFU9XZqiJZj ftsoNzAzcRDPL0lwDQQ7eGzW+ovktO7179KKj38J3YHY8j4gDjj8ivr8QpbcA2uo8usA 46TmrxAjhXW8UGoPveH1egJLBX2Sqmivv5UVz8gV80F61m5mvEMGKcVWnhMGft++KcTk f4XEZ9hQKGP02FqtEhq69UWNVmxOfgFbQL9oa735NRLO8sAxOwvIIBOp4r0A1iqvqjhf 7Yww== ARC-Authentication-Results: i=1; mx.google.com; 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 v108si3457839otb.136.2020.04.03.04.26.45; Fri, 03 Apr 2020 04:26:57 -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; 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 S2390573AbgDCLLq (ORCPT + 99 others); Fri, 3 Apr 2020 07:11:46 -0400 Received: from gardel.0pointer.net ([85.214.157.71]:51838 "EHLO gardel.0pointer.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727898AbgDCLLq (ORCPT ); Fri, 3 Apr 2020 07:11:46 -0400 Received: from gardel-login.0pointer.net (gardel.0pointer.net [IPv6:2a01:238:43ed:c300:10c3:bcf3:3266:da74]) by gardel.0pointer.net (Postfix) with ESMTP id 89E27E80689; Fri, 3 Apr 2020 13:11:44 +0200 (CEST) Received: by gardel-login.0pointer.net (Postfix, from userid 1000) id 20B1A1614E3; Fri, 3 Apr 2020 13:11:44 +0200 (CEST) Date: Fri, 3 Apr 2020 13:11:44 +0200 From: Lennart Poettering To: Ian Kent Cc: Miklos Szeredi , David Howells , Christian Brauner , Linus Torvalds , Al Viro , dray@redhat.com, Karel Zak , Miklos Szeredi , Steven Whitehouse , Jeff Layton , andres@anarazel.de, keyrings@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Aleksa Sarai Subject: Re: Upcoming: Notifications, FS notifications and fsinfo() Message-ID: <20200403111144.GB34663@gardel-login> References: <20200330211700.g7evnuvvjenq3fzm@wittgenstein> <1445647.1585576702@warthog.procyon.org.uk> <2418286.1585691572@warthog.procyon.org.uk> <20200401144109.GA29945@gardel-login> <2590640.1585757211@warthog.procyon.org.uk> <36e45eae8ad78f7b8889d9d03b8846e78d735d28.camel@themaw.net> <27994c53034c8f769ea063a54169317c3ee62c04.camel@themaw.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27994c53034c8f769ea063a54169317c3ee62c04.camel@themaw.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fr, 03.04.20 09:44, Ian Kent (raven@themaw.net) wrote: > > Currently the only way to find the mount id from a path is by parsing > > /proc/self/fdinfo/$fd. It is trivial, however, to extend statx(2) to > > return it directly from a path. Also the mount notification queue > > that David implemented contains the mount ID of the changed mount. I would love to have the mount ID exposed via statx(). In systemd we generally try name_to_handle_at() to query the mount ID first. It returns both the actual fhandle and the mount ID after all, and we then throw the fhandle away. It's not available on all fs though, but it has the benefit that it works without procfs and on a number of older kernels that didn't expose the mnt id in fdinfo. Lennart -- Lennart Poettering, Berlin