Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2485447ybb; Mon, 30 Mar 2020 07:07:06 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtIGucRhV1CBrd0jDgug9p4NAisdMYjpAeF2sJtmOi4RDPQWJPQpMcy4PO69iWMD35NbLO8 X-Received: by 2002:aca:f541:: with SMTP id t62mr7825855oih.172.1585577226723; Mon, 30 Mar 2020 07:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585577226; cv=none; d=google.com; s=arc-20160816; b=wRjY4172Pz0KvkKxV3T+n8v0MUoTQ8j7KZp8SdWlnID5Nqw4MZioIo9WBpi8cwE96N AOqlcYyCGJ3BEsO0K+Mn5YkZEYAqvUYx3t440VHQqEls1FziRKzjykJ4TMlp4gqTR7Fy b556SLetNJvExCTrCO2dre/X8mF7fPpgwDn4D8dv0KWtmpqNauHga6slNKGubH//Pzwl qlVFqjYE1Dw1GI137iQRorW49qZDtBFbWzvK/o6mVtAIZftvZ7UoeQ5bci+F1+whWM0n rg5w2nq49ld8RRvuw6Llev3AWOr05sXoSl+56SucvKtShmJk5TJbjd/poc7u4WJEIs9w n7SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-transfer-encoding :mime-version:subject:cc:to:from:organization:dkim-signature; bh=J/xbcR+U5sZqN3KnB8Gi4wExsJ+uq2zk4m3be9exSUA=; b=bgDUakGQ3OBBUMXn+Cn4VdTVgEZxpSa/A92yIpF+30X68FW8WWdYFdS3ys6RpGi8nX 7pEinNnwkDNyMuL1c8qMVqBKFfUb7pkKUp+xdNKfkZrI6ABYWMmhHnpYVsXQeN+PR92G WCCdhO3uf3SRELJ0yqjn0NDHwMW2ffHxUuPBSPlbcYv9jBTjK27UO4dSKDT+ZLLVXgCu Kc85rp9QPKW+bLREzGiBAoKWn0ZT3rzFWvSM9Jbt8nuYpiq6oEIi/8BreEhMXBb2tksF +5ACvx9OylfnSTfQO0WnWdxdNB0JgmK1WZx/W36SucbqCXcu7THWw4lLz0EeIIuct04F 3qLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VSQD+f4H; 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 s4si6305968oom.84.2020.03.30.07.06.44; Mon, 30 Mar 2020 07:07:06 -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=VSQD+f4H; 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 S1728559AbgC3N6e (ORCPT + 99 others); Mon, 30 Mar 2020 09:58:34 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:44161 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725268AbgC3N6e (ORCPT ); Mon, 30 Mar 2020 09:58:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585576711; 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: content-transfer-encoding:content-transfer-encoding; bh=J/xbcR+U5sZqN3KnB8Gi4wExsJ+uq2zk4m3be9exSUA=; b=VSQD+f4H4yhhYdl/eoFY5FfeObkcPiyHxJroDRPTPxWwpEWItq9gOFILzPgdyqZLE2MoVZ ByKBWlIoau7t/4wmDW6wk0gQH3fEkzxR3feTCjBZiNgHJmWaEHd7WvFakVpGyiyflfPSH5 /BqWaqF9BknUXFAT8W/xzdvsBVvyW40= 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-331-twlqjcaNOvCWPrwhwVyXtQ-1; Mon, 30 Mar 2020 09:58:27 -0400 X-MC-Unique: twlqjcaNOvCWPrwhwVyXtQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DE8E2149CA; Mon, 30 Mar 2020 13:58:25 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-112-66.rdu2.redhat.com [10.10.112.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id E104E5DA66; Mon, 30 Mar 2020 13:58:22 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells To: torvalds@linux-foundation.org cc: dhowells@redhat.com, viro@zeniv.linux.org.uk, dray@redhat.com, kzak@redhat.com, mszeredi@redhat.com, swhiteho@redhat.com, jlayton@redhat.com, raven@themaw.net, andres@anarazel.de, christian.brauner@ubuntu.com, keyrings@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Upcoming: Notifications, FS notifications and fsinfo() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 30 Mar 2020 14:58:22 +0100 Message-ID: <1445647.1585576702@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, I have three sets of patches I'd like to push your way, if you (and Al) are willing to consider them. (1) General notification queue plus key/keyring notifications. This adds the core of the notification queue built on pipes, and adds the ability to watch for changes to keys. (2) Mount and superblock notifications. This builds on (1) to provide notifications of mount topology changes and implements a framework for superblock events (configuration changes, I/O errors, quota/space overruns and network status changes). (3) Filesystem information retrieval. This provides an extensible way to retrieve informational attributes about mount objects and filesystems. This includes providing information intended to make recovering from a notification queue overrun much easier. We need (1) for Gnome to efficiently watch for changes in kerberos keyrings. Debarshi Ray has patches ready to go for gnome-online-accounts so that it can make use of the facility. Sets (2) and (3) can make libmount more efficient. Karel Zak is working on making use of this to avoid reading /proc/mountinfo. We need something to make systemd's watching of the mount topology more efficient, and (2) and (3) can help with this by making it faster to narrow down what changed. I think Karel has this in his sights, but hasn't yet managed to work on it. Set (2) should be able to make it easier to watch for mount options inside a container, and set (3) should make it easier to examine the mounts inside another mount namespace inside a container in a way that can't be done with /proc/mounts. This is requested by Christian Brauner. Jeff Layton has a tentative addition to (3) to expose error state to userspace, and Andres Freund would like this for Postgres. Set (3) further allows the information returned by such as statx() and ioctl(FS_IOC_GETFLAGS) to be qualified by indicating which bits are/aren't supported. Further, for (3), I also allow filesystem-specific overrides/extensions to fsinfo() and have a use for it to AFS to expose information about server preference for a particular volume (something that is necessary for implementing the toolset). I've provided example code that does similar for NFS and some that exposes superblock info from Ext4. At Vault, Steve expressed an interest in this for CIFS and Ted Ts'o expressed a possible interest for Ext4. Notes: (*) These patches will conflict with apparently upcoming refactoring of the security core, but the fixup doesn't look too bad: https://lore.kernel.org/linux-next/20200330130636.0846e394@canb.auug.org.a= u/T/#u (*) Mikl=C3=B3s Szeredi would much prefer to implement fsinfo() as a magic filesystem mounted on /proc/self/fsinfo/ whereby your open fds appear as directories under there, each with a set of attribute files corresponding to the attributes that fsinfo() would otherwise provide. To examine something by filename, you'd have to open it O_PATH and then read the individual attribute files in the corresponding per-fd directory. A readfile() system call has been mooted to elide the {open,read,close} sequence to make it more efficient. (*) James Bottomley would like to deprecate fsopen(), fspick(), fsconfig() and fsmount() in favour of a more generic configfs with dedicated open, set-config and action syscalls, with an additional get-config syscall that would be used instead of fsinfo() - though, as I understand it, you'd have to create a config (fspick-equivalent) before you could use get-config. (*) I don't think Al has particularly looked at fsinfo() or the fs notifications patches yet. (*) I'm not sure what *your* opinion of fsinfo() is yet. If you don't dislike it too, um, fragrantly, would you be willing to entertain part of it for now and prefer the rest to stew a bit longer? I can drop some of the pieces. Anyway, I'm going to formulate a pull request for each of them. Thanks, David