Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp382013ybb; Fri, 3 Apr 2020 04:38:58 -0700 (PDT) X-Google-Smtp-Source: APiQypJ5M3shDd/oHwl/ZUp+J0MLGSuu5t7nojUZyu3PEjc20qg35/FyqG9fdN21GiFEbvzSi97b X-Received: by 2002:a9d:2963:: with SMTP id d90mr5632716otb.149.1585913938134; Fri, 03 Apr 2020 04:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585913938; cv=none; d=google.com; s=arc-20160816; b=XQZhOfa5gK0qs6fVuxROwVD81qFevEfAjFhn6kfkxwv67VBoTstXjcDTzCCX3At1vw 5jplvU/2l+jUPWJt/Y61d9KJlVENVLHOle3clFtQyCFQ6HUf4kuKN3Cdz3JxlrhYs8cL RBM1zqoDpn6Xk/L+UTxXXCz06tmXG/Y+V7bchNjput1UQSES+fLWIzGBQKMe6Ye9bM9b X2bYou1NsHyiGw11bB8Ieo6Vsir4CKpW6xprFFdJ8yAmqukNUIj3ztebd1A8i4Vx3aQJ 7uiYHSQ2fRRy3K/2ei96vVLJgtabNohHKLGXiT5PNQ3ViCO6Sb0cOw5QFDX3a5TWN1Lt hTvg== 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=RpRtMwCbwxDI+qo+/oqeZAlCVAaxxhCpiQv9eibzNMc=; b=d3ckCYwS0fxOps+/KxZVm/S4Kq13VBgKkguGmejEsnpD/e5C5DvCYcL8mVSFvtydjN j+e+166BL2vAD9OYT0n6T2J6wbvtuf6MrDmM2Z7uae+GFc9os93Ppgyxd9dcq7z/LyJr 5/YrcHUhewAxGrQ20zjEr6/mN6WdvbX6Ld+mqMMNXmFrZJo0/1A8Df4XpVYm5qEv51Cl +eQQjdR+rOWNW4ScL+muQKc9EWwdW7py3qwrmTjzxrpTzrYwGkUeijoT6Kd1L7F07W+M H8zoN1OdtYqE3odIgeParPGomwWg3XMGV5o2yBVtHlc8wfcdz0Ze0hd9yquH5v9Sm4sE L6qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=EIfxa4Ux; 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 l15si3582843otl.297.2020.04.03.04.38.44; Fri, 03 Apr 2020 04:38:58 -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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=EIfxa4Ux; 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 S1728168AbgDCLi1 (ORCPT + 99 others); Fri, 3 Apr 2020 07:38:27 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:42438 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728012AbgDCLi1 (ORCPT ); Fri, 3 Apr 2020 07:38:27 -0400 Received: by mail-ed1-f66.google.com with SMTP id cw6so8856004edb.9 for ; Fri, 03 Apr 2020 04:38:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RpRtMwCbwxDI+qo+/oqeZAlCVAaxxhCpiQv9eibzNMc=; b=EIfxa4UxvoyMf6tqDArb/xS4ilQh+kOB2skcCK6Dzrg4ZyA/Tv2iU7k1wFbhTjLnVF rJ399tTN/c2J/RKLujyTC6CHnXz0STybq0DPGRTVeEpTizV+Wg0rsNsaEtJiY25Ffi44 VG6NDqGNE+TsM4HeUPlxJWLBIrDC01SHdbUi0= 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=RpRtMwCbwxDI+qo+/oqeZAlCVAaxxhCpiQv9eibzNMc=; b=jdAVbYK7f9XW7NdqRlMfSyudPbQUYeqI0FFqt1vRe54PgwOwuyjixskhKWbLYBISFc nI4yl0Y56dInM3dMOWRezJR93QW3cIu2HnKMHyD1+fY8dXk2FLy2cP8mTRsmDFmD7S0L AKsvj6uGwWNKGbAgnEZIzr2mZ2TD5ZF1Hjf3WsjE5g1zLGt1m4CmxBLoGUF5xvqxnWWD 6pkKXgAjC7OkvhScT+EVQb/+o8uu+EZ8DwYsQXLvf4/H/CoYMqNwZ3MFrvESJoTIoA7l hwFpS0OBPqGq/0+L86SaSjIzGmiSWq37ZYyLvbJwL9wE/Q7S0DT/X4Y/DRH/026MqTsi ddTg== X-Gm-Message-State: AGi0PuYkGC3CXmEN9Gze75esdU0tTstb+dX9FXaq13QKNChyjFaRBmzo JZXOf0aLc5vEP+KwKehS82Y8C3tLFHsK0o/WsvxUDA== X-Received: by 2002:a17:906:fd7:: with SMTP id c23mr8078187ejk.312.1585913905026; Fri, 03 Apr 2020 04:38:25 -0700 (PDT) MIME-Version: 1.0 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> <20200403111144.GB34663@gardel-login> In-Reply-To: <20200403111144.GB34663@gardel-login> From: Miklos Szeredi Date: Fri, 3 Apr 2020 13:38:13 +0200 Message-ID: Subject: Re: Upcoming: Notifications, FS notifications and fsinfo() To: Lennart Poettering Cc: Ian Kent , 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 Content-Type: multipart/mixed; boundary="000000000000f44c3b05a2615a67" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000f44c3b05a2615a67 Content-Type: text/plain; charset="UTF-8" On Fri, Apr 3, 2020 at 1:11 PM Lennart Poettering wrote: > > 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(). Here's a patch. Thanks, Miklos --000000000000f44c3b05a2615a67 Content-Type: text/x-patch; charset="US-ASCII"; name="statx-add-mount-id.patch" Content-Disposition: attachment; filename="statx-add-mount-id.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k8k45tnj0 RnJvbTogTWlrbG9zIFN6ZXJlZGkgPG1zemVyZWRpQHJlZGhhdC5jb20+ClN1YmplY3Q6IHN0YXR4 OiBhZGQgbW91bnQgSUQKClN5c3RlbWQgaXMgaGFja2luZyBhcm91bmQgdG8gZ2V0IGl0IGFuZCBp dCdzIHRyaXZpYWwgdG8gYWRkIHRvIHN0YXR4LCBzby4uLgoKU2lnbmVkLW9mZi1ieTogTWlrbG9z IFN6ZXJlZGkgPG1zemVyZWRpQHJlZGhhdC5jb20+Ci0tLQogZnMvc3RhdC5jICAgICAgICAgICAg ICAgICB8ICAgIDYgKysrKysrCiBpbmNsdWRlL2xpbnV4L3N0YXQuaCAgICAgIHwg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