Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3298324ybb; Tue, 31 Mar 2020 02:22:20 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuXQLtrs8mq5UjKJT60zc4tnGXO8KCOHzPMNve0Z/dQ3c36vmnFTc69KBwXfIuDtTtEwJVg X-Received: by 2002:aca:4142:: with SMTP id o63mr1384886oia.118.1585646540284; Tue, 31 Mar 2020 02:22:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585646540; cv=none; d=google.com; s=arc-20160816; b=VAYV/Ku/2SxyFsON2MeTOLy9PiGcA4BBTsR2tTV6OoqpzzmZGOgJcNYGC2uYxfg6Dq MZCtrdmntphKtVVAQTD6u/qqE+LYbkCMWh2EhzWq2ELVrt8wnsOXX4is3xW5w3xjjKRP NG6JhJn34DiFOU1fFw2H89t2wnjkyX3jI8dZI8kBeOuy1nyFdiG/dxrxKh+XefESNVvI Sx+p6Wxhtr2OCimPa+h9Y/4VyVvAK4YK7qSN1gn0UMFHNC/DcjrRwHEPwgmQDAKqO2YL luhbfmRXhoo5waAGP8pmtXRnmLXyetCg7hD4B1uAbn8B8nh8LQoUpRULFYghEyqwmesx x7Vw== 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 :dkim-signature; bh=GTjY9VYWDP/F7mEWfjv7lXAEg3SDOKfVcGPNXYsvZyU=; b=cAEcxY0NHXlry4r3udET+5rOd8Piyx+Tr87FZraGxpdDxom8LhfAFa646gaQReJal1 I1AaocLqp8+8v4TqA0ICmOv4sIkdgmMWyKpY8SVD49d96QkFyDzOkKcPCwoEYYG8xOkN 54UOIeqAU9u1nmSDwQzUnjGEEErgX+7mqwhtQ35jptK7REWCUapffNz4FJ8wdcH37P2J hfnWmBdXlhhFdif+uZoX+fe1eCKjwYCe+ZZh/RgVv6ESOG3yRhpzw/sMPsLbdMNqyl2b UFtBCJty4R1nAxq3YZXXr6L2byS4BY96HlckKbU/tC3CXI+qt/EyC5PvVGl/wwkPlVC7 OUaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PNuFd67E; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a7si3639754oop.8.2020.03.31.02.22.08; Tue, 31 Mar 2020 02:22:20 -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=@redhat.com header.s=mimecast20190719 header.b=PNuFd67E; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731881AbgCaJVR (ORCPT + 99 others); Tue, 31 Mar 2020 05:21:17 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:25339 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731773AbgCaJVP (ORCPT ); Tue, 31 Mar 2020 05:21:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585646474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GTjY9VYWDP/F7mEWfjv7lXAEg3SDOKfVcGPNXYsvZyU=; b=PNuFd67EDDf3+0MFfSKQBc4e4VMuGXyFlkVqDH4nJh7Fb1l51lGJvRmBE48kZiYGm6lEVj qB9mNDiSI64BsDUbLdGxIK94a6RYG+RPD977ZtSICV8fFYLie0gxgOf0Ugqawl6DCA5kwC meyjqPvJL6evWoVU6bNdi32m6RYRo84= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-197-npjoz2J-OJeG2S4WkAFftw-1; Tue, 31 Mar 2020 05:21:11 -0400 X-MC-Unique: npjoz2J-OJeG2S4WkAFftw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C678D8017CC; Tue, 31 Mar 2020 09:21:09 +0000 (UTC) Received: from ws.net.home (unknown [10.40.194.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6C89919C6A; Tue, 31 Mar 2020 09:21:04 +0000 (UTC) Date: Tue, 31 Mar 2020 11:21:01 +0200 From: Karel Zak To: Miklos Szeredi Cc: David Howells , Linus Torvalds , Al Viro , dray@redhat.com, Miklos Szeredi , Steven Whitehouse , Jeff Layton , Ian Kent , andres@anarazel.de, Christian Brauner , keyrings@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Upcoming: Notifications, FS notifications and fsinfo() Message-ID: <20200331092101.fnipaxqewol2hzd2@ws.net.home> References: <1445647.1585576702@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 30, 2020 at 10:28:56PM +0200, Miklos Szeredi wrote: > All this could be solved with a string key/value representation of the > same data, with minimal performance loss on encoding/parsing. The > proposed fs interface[1] is one example of that, but I could also > imagine a syscall based one too. Yes, key/value is possible solution. The question is if we really need to add extra /sys-like filesystem to get key/value ;-) I can imagine key/value from FD based interface without open/read/close for each attribute, fd = open("/mnt", O_PATH); fsinfo(fd, "propagation", buf, sizeof(buf)); fsinfo(fd, "fstype", buf, sizeof(buf)); close(fd); why I need /mountfs//propagation and /mountfs//fstype to get the same? It sounds like over-engineering without any extra bonus. Anyway, if we have FD based interfaces like fsopen(), fsmount(), open_tree() and move_mount() then it sounds strange that you cannot use the FD to ask kernel for the mount node attributes and you need to open and read another /sys-like files. IMHO it would be nice that after open(/mnt, O_PATH) I can do whatever with the mount point (umount, move, reconfigure, query, etc.). Please, try to keep it simple and consistent ;-) Karel -- Karel Zak http://karelzak.blogspot.com