Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2254755iob; Thu, 5 May 2022 20:50:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpK57Zz421RM5lIq+jLql/RIlauJ9eZwre2VHQns9edLjYwPmr5BRlhS1pFqIgoapx7AfX X-Received: by 2002:a05:6402:50c7:b0:427:c764:9331 with SMTP id h7-20020a05640250c700b00427c7649331mr1439478edb.228.1651809008902; Thu, 05 May 2022 20:50:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651809008; cv=none; d=google.com; s=arc-20160816; b=Fu1W2/jg7OT6eI3W9+Swpxa5x1W4HKdr0MLAGEp4Ffo8Hyvp5CAWSMBUfzJIjxZU8x /zeoDN6RaZJtXDpplGUPL8PJgQps9tS1iZqAMfnog5Zv8t90AHOOi1usczYNljgzObh6 lQJBEbrOVSkmJxOZTCCdL64mLBHlUS252vUeHH67Vq6+05NKqsh1E0AR1Dki8Ms3Kc32 3yz4r6phXNVjkHxPDr8qS28pIc9QfPYdvuHW5eV8vd3Yugi8tBgB8ruFYX3k4ufPX/sa k9PA3kD0UiIFPvlsQOmoV6t1UWJHCvKXmBFWY0XtLl8irjFkfhHgAkTOhGz/unerCFwI BykQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YlZT13jIA/It2oCfOEpEIe9Baj4YpyTZ8d0J7CEtWsQ=; b=OcAKGPbQfV7+THi2ghgDoomhwjkLfXKZUwrXnx23h+rNZ9uffcpMXGZ4wy+hpQPm4l /tWR+2IomddxMFu+DGWJqsOzI7eaAG+lqrNg2GgOd/+3lEN/wC9FfxTzgn82QoDiKae8 Eyu+UwkqtZ3lahnrD2jmya5DAlxfgaV/+zTx73HTqWD1NwiLEoicjUdrwMairiIid7ur 05C3jrQsFI6/hNPt3nhF2cf1AV7B0THWO7B6kwVkFeWo1Cxmk4bfOuQZIWa2meSeSJKS hXt8abNkKY8nFp/1xlkMjio5vZXDge3MRRFx4og/9CIFzrLMHS0iryu5oYgYyPpPcaEu np6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OUf7E+YH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m13-20020a056402510d00b00425d40720f1si4282204edd.156.2022.05.05.20.49.45; Thu, 05 May 2022 20:50:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OUf7E+YH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1376743AbiEEMed (ORCPT + 99 others); Thu, 5 May 2022 08:34:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358555AbiEEMeZ (ORCPT ); Thu, 5 May 2022 08:34:25 -0400 Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [170.10.129.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B514D4EDC4 for ; Thu, 5 May 2022 05:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651753844; 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=YlZT13jIA/It2oCfOEpEIe9Baj4YpyTZ8d0J7CEtWsQ=; b=OUf7E+YHkOvM2zS2vtDgKzaBaw/o1s6wu/V4XxHTQZ9JuWIO2PskvMN00sWGvxU4PSt5zN RUc4K8AOYOeLUjAPWkSY/jObnwZMVZnW3XYpXwXdzUoBvdD0TfU0GqXwVQf3qOIWcSoMhF WE490gTwYkvN/2Odib22xJMPubDA23Q= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-343-0xIDvD5lPEWJE6D9hkjW7Q-1; Thu, 05 May 2022 08:30:39 -0400 X-MC-Unique: 0xIDvD5lPEWJE6D9hkjW7Q-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B60953810D27; Thu, 5 May 2022 12:30:38 +0000 (UTC) Received: from ws.net.home (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 06CB8463E1C; Thu, 5 May 2022 12:30:35 +0000 (UTC) Date: Thu, 5 May 2022 14:30:33 +0200 From: Karel Zak To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, Dave Chinner , Theodore Ts'o , Greg KH , Christian Brauner , linux-kernel@vger.kernel.org, Linux API , linux-man , LSM , Ian Kent , David Howells , Linus Torvalds , Al Viro , Christian Brauner , Amir Goldstein , James Bottomley Subject: Re: [RFC PATCH] getting misc stats/attributes via xattr API Message-ID: <20220505123033.sgcyx7kfl4kcfcds@ws.net.home> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 03, 2022 at 02:23:23PM +0200, Miklos Szeredi wrote: > Examples: > > $ getfattr -etext -n ":" . > # file: . > :="mnt:\000mntns:" > > $ getfattr -etext -n ":mnt:" . > # file: . > :mnt:="info" > > $ getfattr -etext -n ":mnt:info" . > # file: . > :mnt:info="21 1 254:0 / / rw,relatime - ext4 /dev/root rw\012" Is there a way how to get mountinfo-like entry by mount ID for some sub-tree? Something like: getfattr -etext -n ":mnt:info:21" / The interface has to be consistent with some notification system (I see your question about fsnotify/fanotify at linux-fsdevel) and mount ID seems better than paths due to over-mounts, etc. > $ getfattr -etext -n ":mntns:" . > # file: . > :mntns:="21:\00022:\00024:\00025:\00023:\00026:\00027:\00028:\00029:\00030:\00031:" > > $ getfattr -etext -n ":mntns:28:" . > # file: . > :mntns:28:="info" Karel -- Karel Zak http://karelzak.blogspot.com