From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 760BAC433E0 for ; Wed, 5 Aug 2020 08:01:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5042622B40 for ; Wed, 5 Aug 2020 08:01:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="JovMMmze" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727867AbgHEIB4 (ORCPT ); Wed, 5 Aug 2020 04:01:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726056AbgHEIA7 (ORCPT ); Wed, 5 Aug 2020 04:00:59 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4705FC061756 for ; Wed, 5 Aug 2020 01:00:59 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id df16so15477641edb.9 for ; Wed, 05 Aug 2020 01:00:59 -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=EIQ0uWOdJ++JxFUQ1HmZt5yCmSysMlWXqs04qnIH2t8=; b=JovMMmze/ttNrmY/DnMqXihEEGGKa1uofyYf/oxNV+TQQ3LTkh7OFwnGTAZBtxLtN7 Fqtd03a+AYZjCg4MXAQq4qkV8JK1Zn4i7HA8oyPn2uEnw5ialjz4BT2tZqSfpNJMETkT WOt0pIcGbePrTBjouZ25xUAWlLwbmu6AqBFVU= 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=EIQ0uWOdJ++JxFUQ1HmZt5yCmSysMlWXqs04qnIH2t8=; b=VhAkEJ/Zim26fBYAqjk48BbrJJh7AUbSdfggUyrbycFdIqd/HBl3cR3o49XcytzIAI Cf4QQWwIvpQsC1q4lmUGqF0FSdXRK+o8lAVC8NU/ihNlButIsMoS1IEgKRWQoK20ga+W EciHvyNUsP+v/n7Kawiwl0deZLg+/nxKUhfdYHStThyEfNNUZIWGgTJUptS0mIaJmJi/ OLxGb/xwsJ1NVp/dESDDA+guzl/rffSpDGf4qp6bgrxtiv82n/Ws4SMKulucPrDnFH8+ vagdo4Dk2EhhCT17XK1LzwnFpQRFIPLR+FktEORVsQMGdG9Zziem8HXjVqL7pB64Di/E Hmvw== X-Gm-Message-State: AOAM531kl4o/WZFsco/gwvvjtAiOffsIks4W9u6akEhRLpFgldPfbqNe Hu9RioTBCTR4MuAEEBZ+kvFNcz85P9XNkMrxXP80uA== X-Google-Smtp-Source: ABdhPJzVZYXjEjW7cAtLmzaSw4Xs0qoUixG31YHsCBZaYZ//RRu9nnPEXdKwKct7yCvGc0tKDbvT1z98gPurWd/4pPA= X-Received: by 2002:a05:6402:1bc5:: with SMTP id ch5mr1589677edb.364.1596614457770; Wed, 05 Aug 2020 01:00:57 -0700 (PDT) MIME-Version: 1.0 References: <1842689.1596468469@warthog.procyon.org.uk> <1845353.1596469795@warthog.procyon.org.uk> In-Reply-To: From: Miklos Szeredi Date: Wed, 5 Aug 2020 10:00:46 +0200 Message-ID: Subject: Re: [GIT PULL] Filesystem Information To: Ian Kent Cc: David Howells , Linus Torvalds , Al Viro , Karel Zak , Jeff Layton , Miklos Szeredi , Nicolas Dichtel , Christian Brauner , Lennart Poettering , Linux API , linux-fsdevel@vger.kernel.org, LSM , linux-kernel@vger.kernel.org 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 Wed, Aug 5, 2020 at 3:33 AM Ian Kent wrote: > > On Tue, 2020-08-04 at 16:36 +0200, Miklos Szeredi wrote: > > And notice how similar the above interface is to getxattr(), or the > > proposed readfile(). Where has the "everything is a file" > > philosophy > > gone? > > Maybe, but that philosophy (in a roundabout way) is what's resulted > in some of the problems we now have. Granted it's blind application > of that philosophy rather than the philosophy itself but that is > what happens. Agree. What people don't seem to realize, even though there are blindingly obvious examples, that binary interfaces like the proposed fsinfo(2) syscall can also result in a multitude of problems at the same time as solving some others. There's no magic solution in API design, it's not balck and white. We just need to strive for a good enough solution. The problem seems to be that trying to discuss the merits of other approaches seems to hit a brick wall. We just see repeated pull requests from David, without any real discussion of the proposed alternatives. > > I get that your comments are driven by the way that philosophy should > be applied which is more of a "if it works best doing it that way then > do it that way, and that's usually a file". > > In this case there is a logical division of various types of file > system information and the underlying suggestion is maybe it's time > to move away from the "everything is a file" hard and fast rule, > and get rid of some of the problems that have resulted from it. > > The notifications is an example, yes, the delivery mechanism is > a "file" but the design of the queueing mechanism makes a lot of > sense for the throughput that's going to be needed as time marches > on. Then there's different sub-systems each with unique information > that needs to be deliverable some other way because delivering "all" > the information via the notification would be just plain wrong so > a multi-faceted information delivery mechanism makes the most > sense to allow specific targeted retrieval of individual items of > information. > > But that also supposes your at least open to the idea that "maybe > not everything should be a file". Sure. I've learned pragmatism, although idealist at heart. And I'm not saying all API's from David are shit. statx(2) is doing fine. It's a simple binary interface that does its job well. Compare the header files for statx and fsinfo, though, and maybe you'll see what I'm getting at... Thanks, Miklos