Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3266926ybb; Tue, 31 Mar 2020 01:37:01 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsj2s+uJK6Fv9Y0dPdDd/oVv4TAJi41dTAkzd99ul/c6jSSop12dfCl4D7pUXvxCspOMZoZ X-Received: by 2002:a9d:921:: with SMTP id 30mr11759097otp.53.1585643820842; Tue, 31 Mar 2020 01:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585643820; cv=none; d=google.com; s=arc-20160816; b=ReqfJeP3mg4oSmSprah5qwHrfUa1vu++pLir7ZLY+DiBe17qjUA8bslWZdXj57WGmY OeqBhjXwAT4UcI8FkGLvAmZSPIn18LqTLkQjOBHGJks+KoiTiCtj7DmUH2AytIKPRx3r j6i+G6Quekfei61DBTkuVQAMPwKS42J7vWdmsmhO1GGtJU0YyPF3GgRu171TUyLjKlkg jGjfJw4mwgMoSBq2czUJIuOeWHOMh+YOVkbHHG5Kl8ehve8GVfst4FsXyvdaOdGPL+M/ 9E+Rm4JOITHl/la8MYXOiyAhxHwgYzcfxZ3MkjORJiSbGU+VlG4Rqu4vkSTrp/Ha0I7r SzaQ== 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=2rLFubCEpgldKurlG4URIBkpTK5CEAUrKTvEkFewMCc=; b=w1Kyv53/Dp2VZ8JIuLLyhZKaCQ11ZWzOb39tWv+ub/CWkMqtS+g+KqB+bkKWKh5o0d WFP6u1UzYgo6Tp8P1qurY7448ypayrz8RGyEW+///4UaS1CFNxlhqctn1zggcpxpr2JA IHX3KyYPBZr0EsIo7oohm8bbi3XaPSTX0Qp4QnaV+okAj3CjsTc4PN42K3S+yPLWU8fq 3AaNIlk4HEBFtWWGOI9cPgX4iXIQYveYjZdNTKiPpmkzhfGQ3ayMCYyOiVTFxYuP34Wa 3OQPelABqxQJBHC0O1ZSmSZGTc0E4xhL8/KQE4N+bhBxUUpi8XkVrD+yfG+M0aLpQvpE Ioww== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=Pl6wunnF; 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 r17si7385670otp.254.2020.03.31.01.36.48; Tue, 31 Mar 2020 01:37:00 -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=Pl6wunnF; 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 S1730216AbgCaIfN (ORCPT + 99 others); Tue, 31 Mar 2020 04:35:13 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:32782 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729624AbgCaIfL (ORCPT ); Tue, 31 Mar 2020 04:35:11 -0400 Received: by mail-ed1-f67.google.com with SMTP id z65so24131288ede.0 for ; Tue, 31 Mar 2020 01:35:08 -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=2rLFubCEpgldKurlG4URIBkpTK5CEAUrKTvEkFewMCc=; b=Pl6wunnFAOyFrLjRF4MLa/729tmRbfvLqvNbOMvx8XQPOctWtryQtH04K/E5S2+qBC ePAeM6bPzByKY90dlYOUaqZEo+JcCIjCXbWPFBl4qB4tZM4goBwE/hSdS3js5G4lNwXl urTXdaybd2HhJ+bGwiYNbcuzzErWv5XyrqZ9s= 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=2rLFubCEpgldKurlG4URIBkpTK5CEAUrKTvEkFewMCc=; b=id2XG6LZOpr086GJy4LQrD2FjqJCZNAlD4fLs6Mb2Lus21sAgFtCBeYS8hSZ3Xmyjq kKLvTIKmhYEfleslTrlX/UOri4v3pzaMiDvau13/r7XiC+COO/g5Y9NrFTEp1SPQoNtK XP5cbwDLa9Bwx2Mdm70iL85xebb77OQvpZ2e828ax0TXbw9U0dXVqrkt9umdnnp8RjoW RypY5hog42IqCcF5avm0aprRos68kBVyyqpLQKx7TcGOCV8TA8EcyhjPhguFtJE/oIv6 EWXmU109GRgDZn55Xq8/MMIeMFBO0AfHudp9z24567UAJL+ggIKZD3XB0mhFqm3QIc32 n/6g== X-Gm-Message-State: ANhLgQ3sE8ff1TFZxjDCrP6qgiVTNpRvl7uVMe5oMzwXhGa8yKFKENZ5 G161134RXP6v0u++v+PQePS22Q7vZ7/pnoAoFQjH8w== X-Received: by 2002:a17:906:6545:: with SMTP id u5mr5686172ejn.27.1585643707995; Tue, 31 Mar 2020 01:35:07 -0700 (PDT) MIME-Version: 1.0 References: <1445647.1585576702@warthog.procyon.org.uk> <20200330211700.g7evnuvvjenq3fzm@wittgenstein> <20200331081507.f6an4x32cxwpxdpd@wittgenstein> In-Reply-To: <20200331081507.f6an4x32cxwpxdpd@wittgenstein> From: Miklos Szeredi Date: Tue, 31 Mar 2020 10:34:56 +0200 Message-ID: Subject: Re: Upcoming: Notifications, FS notifications and fsinfo() To: Christian Brauner Cc: David Howells , Linus Torvalds , Al Viro , dray@redhat.com, Karel Zak , Miklos Szeredi , Steven Whitehouse , Jeff Layton , Ian Kent , andres@anarazel.de, keyrings@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Lennart Poettering , 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 Tue, Mar 31, 2020 at 10:15 AM Christian Brauner wrote: > > On Tue, Mar 31, 2020 at 07:11:11AM +0200, Miklos Szeredi wrote: > > On Mon, Mar 30, 2020 at 11:17 PM Christian Brauner > > wrote: > > > > > Fwiw, putting down my kernel hat and speaking as someone who maintains > > > two container runtimes and various other low-level bits and pieces in > > > userspace who'd make heavy use of this stuff I would prefer the fd-based > > > fsinfo() approach especially in the light of across namespace > > > operations, querying all properties of a mount atomically all-at-once, > > > > fsinfo(2) doesn't meet the atomically all-at-once requirement. Sure, > > it's possible to check the various change counters before and after a > > batch of calls to check that the result is consistent. Still, that's > > not an atomic all-at-once query, if you'd really require that, than > > fsinfo(2) as it currently stands would be inadequate. > > It at all that's only true for batch requests. For example, there's no way to atomically query mount flags, parent, and list of children with a single fsinfo() call, you actually need three calls and they can reflect different states of the same mount. Not saying this is a problem, just that there's no list of requirements on what is needed and why. > > > and safe delegation through fds. Another heavy user of this would be > > > systemd (Cced Lennart who I've discussed this with) which would prefer > > > the fd-based approach as well. I think pulling this into a filesystem > > > and making userspace parse around in a filesystem tree to query mount > > > information is the wrong approach and will get messy pretty quickly > > > especially in the face of mount and user namespace interactions and > > > various other pitfalls. > > > > Have you actually looked at my proposed patch? Do you have concrete > > Yes. So have others, Al actively disliked and nacked it and no-one got > excited about it. Al, as far as I remember, nacked several things the patch was doing. I fixed those. > > issues or just vague bad feelings? > > We have had that discussion on-list where I made my "vague bad feelings" > clear where you responded with the same dismissive style so I don't see > the point in repeating this experience. > > Again, I want to make it clear that here I'm stating my preference as a > user of this api and as such I don't want to have to parse through a > filesystem to get complex information about filesystems. We've had > fruitful discussions [1] around how fsinfo() ties in with supervised > mounts and the rest of the mount api and its clear and simple especially > in the face of namespaces and implements a nice delegation model. So +1 > from me. And you keep ignoring the fact that my patch implements that exact same delegation model. That's why I'm asking if you have looked at it or not. The "I don't want to have to parse through a filesystem to get complex information about filesystems" is not a set of requirements that an API can be designed from. Thanks, Miklos