Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp609552ybd; Wed, 26 Jun 2019 03:48:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7TPzBcpvSOv6dgOrmVsDnLKBEoh2b68yH/mZB9/05Ih0XaGiXQvE+amTowWazA2FZmFOe X-Received: by 2002:a17:90a:bb8a:: with SMTP id v10mr4033290pjr.78.1561546090797; Wed, 26 Jun 2019 03:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561546090; cv=none; d=google.com; s=arc-20160816; b=kJhR/yWmr+hOqAvhj0SYtBqxLx7ZresNt+DX7T0vbWtgz4D1EgQFr/IfHX6BXN541T 4wT5rKSckXg26hzLAUbaBJSm57vdGvJ36MPH5Uyn9Kk/ASrcUi/ax0KvcGiM/sKxHbzs Cb0D0NncQ/Fhls2GK0g+UoUytlYzZdFhsEhpj+WnQ+qE0Yqos1LKxDoNpn2iIxGEtaax xpV180++1KvP0S5rOWO1vPFJ5LC3sw0F8hmiH5WWiExzZV/CsGIERv4C+sW7CP/t5gm7 Bk2s6h/eS9rNk1lADIgxR59Ldrm/a7gpWK1IHWNAcgwFPIbDLUNNSeuB7aYJftsgGV0G 4UOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fSwT7q8BLOXNpzs+danpM3n1/i2uCJHF7PPr1vSLfUI=; b=U0M1Q0n56GlFHBU6fUNOnjlmF9zyYvIp4/xuz6cHgXP8JKWjXlvQA5HbPiwGvuzLOR r37q1Ei4Ivyj1nriM54lK5ENJr8R5m6tqznEW1FmJ3v/1yUip1HqQnS2k6mquRqHQZRJ xIC6wzoDmI7Ysgut5fqk0cezWoofjOI6Nf/9EiQ6GowQnKbvvxR+/BD1yoDWMtTWRbaK cIwu+poajyXrTgIjMj+t/jXDbukYh1zKm36tR3SWXl4MZeSInPvp45qr6XgJHL4OTjlC ZqMQjqAeTK4zFEFNbGEoknCHlBmNy0Bf/5VL8FfUe9be6r25rgxAWVnRJNrPj8KZLw5Y lcfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=PS97z0V4; 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 a94si1678168pje.19.2019.06.26.03.47.54; Wed, 26 Jun 2019 03:48:10 -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=@brauner.io header.s=google header.b=PS97z0V4; 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 S1727159AbfFZKrL (ORCPT + 99 others); Wed, 26 Jun 2019 06:47:11 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38103 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbfFZKrK (ORCPT ); Wed, 26 Jun 2019 06:47:10 -0400 Received: by mail-wm1-f67.google.com with SMTP id s15so1579295wmj.3 for ; Wed, 26 Jun 2019 03:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fSwT7q8BLOXNpzs+danpM3n1/i2uCJHF7PPr1vSLfUI=; b=PS97z0V4J4hvrFU+KNWT9KYw44s2DQgCAUU9WUGDvoPpxuLC6OGdIjueLKdBR7rIMD /c+6iW62x6//m985XD5u0ll7y/SU0ES0Vq1A4U2sZX/i7DvMz1c+3OEv9MelQbHtVti4 SkTWJtxzYLtaBybXaTu1kQCt34D96VbpPP+z6mGodaWlxG0MtHvMeBQNn5pf6XWz/8Wq +IYgMuaS7yiGRxDq2Et47sBq6d9qZIYAANakOIRBK6b34dbMGWDFL37AcXCQVfEKJJky aw1DQLorLWmpge7WBYN+IR+yTIKFowXM2Rk5HYT5R1TDhKhL6um8jO4UGWPXCMU5ZcTL rrRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fSwT7q8BLOXNpzs+danpM3n1/i2uCJHF7PPr1vSLfUI=; b=Wu1GiTJYzTTVpv+/Wav93nthC6GDzrNxVrX7F+oqIMkVVKhu6S2RJPJAm0YgPGMhrB l/r3VdVsZOqg+yxnKwIceaHNArIC7oFGi0GF7h2cFJGoUADclsbbrlP+RLy2B3D9X4P6 wny6k7IjKkT9KakMEJrwPGcwv5L1fjW3SNZUK7xmCgh2N83zmLvEeysVQfRcvuuSxa0F j+DQZBjpz/uKq9HhTnzN2OgObRqS6Xqll0CTP1xCU9wBOsg5yfjCP8/c3FrFNRjD6/hl HO++Z4DDNtKtAETqVbv7SAlHprfcSQxOwz1bs1gPas8Z0UyBZdIAUTExB3SHjFRZqKfI UFzQ== X-Gm-Message-State: APjAAAXqBK49xU/7oRberddPcWC/phc9SRenxnSOLy2f29FUd4lZempK EonxdN9Zvl9L6WrdxPF3RGMWBQ== X-Received: by 2002:a1c:4054:: with SMTP id n81mr2343827wma.78.1561546027369; Wed, 26 Jun 2019 03:47:07 -0700 (PDT) Received: from brauner.io ([212.91.227.56]) by smtp.gmail.com with ESMTPSA id d5sm16228435wrc.17.2019.06.26.03.47.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 03:47:06 -0700 (PDT) Date: Wed, 26 Jun 2019 12:47:05 +0200 From: Christian Brauner To: Ian Kent Cc: David Howells , viro@zeniv.linux.org.uk, mszeredi@redhat.com, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/25] VFS: Introduce filesystem information query syscall [ver #14] Message-ID: <20190626104704.dwjd4urpsmuheirc@brauner.io> References: <156138532485.25627.7459410522109581052.stgit@warthog.procyon.org.uk> <20190626100525.irdehd24jowz5f75@brauner.io> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 26, 2019 at 06:42:51PM +0800, Ian Kent wrote: > On Wed, 2019-06-26 at 12:05 +0200, Christian Brauner wrote: > > On Mon, Jun 24, 2019 at 03:08:45PM +0100, David Howells wrote: > > > Hi Al, > > > > > > Here are a set of patches that adds a syscall, fsinfo(), that allows > > > attributes of a filesystem/superblock to be queried. Attribute values are > > > of four basic types: > > > > > > (1) Version dependent-length structure (size defined by type). > > > > > > (2) Variable-length string (up to PAGE_SIZE). > > > > > > (3) Array of fixed-length structures (up to INT_MAX size). > > > > > > (4) Opaque blob (up to INT_MAX size). > > > > > > Attributes can have multiple values in up to two dimensions and all the > > > values of a particular attribute must have the same type. > > > > > > Note that the attribute values *are* allowed to vary between dentries > > > within a single superblock, depending on the specific dentry that you're > > > looking at. > > > > > > I've tried to make the interface as light as possible, so integer/enum > > > attribute selector rather than string and the core does all the allocation > > > and extensibility support work rather than leaving that to the filesystems. > > > That means that for the first two attribute types, sb->s_op->fsinfo() may > > > assume that the provided buffer is always present and always big enough. > > > > > > Further, this removes the possibility of the filesystem gaining access to > > > the > > > userspace buffer. > > > > > > > > > fsinfo() allows a variety of information to be retrieved about a filesystem > > > and the mount topology: > > > > > > (1) General superblock attributes: > > > > > > - The amount of space/free space in a filesystem (as statfs()). > > > - Filesystem identifiers (UUID, volume label, device numbers, ...) > > > - The limits on a filesystem's capabilities > > > - Information on supported statx fields and attributes and IOC flags. > > > - A variety single-bit flags indicating supported capabilities. > > > - Timestamp resolution and range. > > > - Sources (as per mount(2), but fsconfig() allows multiple sources). > > > - In-filesystem filename format information. > > > - Filesystem parameters ("mount -o xxx"-type things). > > > - LSM parameters (again "mount -o xxx"-type things). > > > > > > (2) Filesystem-specific superblock attributes: > > > > > > - Server names and addresses. > > > - Cell name. > > > > > > (3) Filesystem configuration metadata attributes: > > > > > > - Filesystem parameter type descriptions. > > > - Name -> parameter mappings. > > > - Simple enumeration name -> value mappings. > > > > > > (4) Mount topology: > > > > > > - General information about a mount object. > > > - Mount device name(s). > > > - Children of a mount object and their relative paths. > > > > > > (5) Information about what the fsinfo() syscall itself supports, including > > > the number of attibutes supported and the number of capability bits > > > supported. > > > > Phew, this patchset is a lot. It's good of course but can we please cut > > some of the more advanced features such as querying by mount id, > > submounts etc. pp. for now? > > Did you mean the "vfs: Allow fsinfo() to look up a mount object by ID" > patch? > > We would need to be very careful what was dropped. Not dropped as in never implement but rather defer it by one merge window to give us a) more time to review and settle the interface while b) not stalling the overall patch. > > For example, I've found that the patch above is pretty much essential > for fsinfo() to be useful from user space. Yeah, but that interface is not clearly defined yet as can be seen from the commit message and that's what's bothering me most.