Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1907943rda; Tue, 24 Oct 2023 07:02:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFP1ZByhlkNpHEChJpxfc9ldVXrTVxcuLkg1ZX4U5WjHTTNxewlT4hG23hSz9E2b7ZhV0sL X-Received: by 2002:a17:90b:128b:b0:27d:3ed2:86a5 with SMTP id fw11-20020a17090b128b00b0027d3ed286a5mr11030606pjb.33.1698156146747; Tue, 24 Oct 2023 07:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698156146; cv=none; d=google.com; s=arc-20160816; b=QkXljG8mz3cHdZmW1tZVDhQ0ls/8TYh16L/jRMfbeR48Dgqp74jlWrmUjxLfOHAZ+r 1oiMGSoVhZOL6jxgIDUum1hvgOhDEaVn40VNMV6gP8nPpa5yVhxLzVZ/jkjPJJzX1OuT ESWJwbN9pKOOPdYzQhmI1Y+RqDSXyhx/Z0CnEr0oLiLYNaOvRSXj4dQFhm9EGOwXiXiX fGWKkjh2q9Om4c9NEuiJL/s6Pn1ro2v5q8Y0dn4DAfE9+l50EmHdL2EKPUQNqGDID0gz 5El7aB8AAQEXhW+n0m/kJerhKLQO/gRzn3+9p97JbtchcpIZn7jBvMkD7QP5IU2AFT16 ZvNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xWzuQlELGbL+gCIg4u/+SkfNkN3ZnZ0/znjFII22yfs=; fh=HVDi2sZ9UI5PcFEGHWcdhJF9d5FhhTRPU659OpPv54s=; b=SgzWA01K6glOIMRrfyRleoW7I8sa9/2mKiG1yScEMTUgb0NEYJICcBwWJjI1vKXRim buQBepctY47oK7vMBktw2TJZwBwQ667AaqxsIwHyzIO6W2Co/zCNrrSfALcUb5QDdPZg ljHm/dEaY99Xs2vU2JtnVFedPEvT8EZZjcG4V6KYvXhsMA/dYztDWrEK6xt+LbVpmyGS st1I7wRg6/Hhi2EaXDe18vaqZFN1cZUujiO+yrsoMafoeIMcRVA47yaEl9amLq/0Xnds LBDdDiwrwg6td4FlQ/AR83hnTGuQRvLiy0RACQQ0AITMyGx2WyyJsVVCN1GLW3zNv9KT 6nZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DQlo+nzf; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id lr9-20020a17090b4b8900b0027d23073d19si8817513pjb.165.2023.10.24.07.02.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 07:02:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DQlo+nzf; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id B035F8039DFA; Tue, 24 Oct 2023 07:02:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234664AbjJXOCE (ORCPT + 99 others); Tue, 24 Oct 2023 10:02:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234582AbjJXOCD (ORCPT ); Tue, 24 Oct 2023 10:02:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10999110 for ; Tue, 24 Oct 2023 07:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698156080; 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=xWzuQlELGbL+gCIg4u/+SkfNkN3ZnZ0/znjFII22yfs=; b=DQlo+nzfv2GCqQlKPbe8d6+oRUm3jJagBKFWoAVXOOP8nA8z3++qp2vEm4ab8XpqisJUyP GW1tO9RBnz3nUEW/1NKK+ln8a+2IP87YogpuXtZrOR8dl72AFKLuErivVERuxMJQVgUF78 twUr5kZdXaN534ME8nHK7nh0kgIOnk4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-483-ce_wB_DZMKCIlrTetlG3ow-1; Tue, 24 Oct 2023 10:01:11 -0400 X-MC-Unique: ce_wB_DZMKCIlrTetlG3ow-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BBD5D918571; Tue, 24 Oct 2023 14:01:10 +0000 (UTC) Received: from [100.85.132.103] (unknown [10.22.48.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 176F92026D4C; Tue, 24 Oct 2023 14:01:08 +0000 (UTC) From: Benjamin Coddington To: Amir Goldstein Cc: Trond Myklebust , Anna Schumaker , Jeff Layton , Chuck Lever , Christian Brauner , Jan Kara , linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org Subject: Re: [PATCH] nfs: derive f_fsid from server's fsid Date: Tue, 24 Oct 2023 10:01:07 -0400 Message-ID: <1CFE0178-CE91-4C99-B43E-33EF78D0BEBF@redhat.com> In-Reply-To: <20231024110109.3007794-1-amir73il@gmail.com> References: <20231024110109.3007794-1-amir73il@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 24 Oct 2023 07:02:05 -0700 (PDT) On 24 Oct 2023, at 7:01, Amir Goldstein wrote: > Fold the server's 128bit fsid to report f_fsid in statfs(2). > This is similar to how uuid is folded for f_fsid of ext2/ext4/zonefs. > > This allows nfs client to be monitored by fanotify filesystem watch > for local client access if nfs supports re-export. > > For example, with inotify-tools 4.23.8.0, the following command can be > used to watch local client access over entire nfs filesystem: > > fsnotifywatch --filesystem /mnt/nfs > > Note that fanotify filesystem watch does not report remote changes on > server. It provides the same notifications as inotify, but it watches > over the entire filesystem and reports file handle of objects and fsid > with events. I think this will run into trouble where an NFSv4 will report both fsid.major and fsid.minor as zero for the special root filesystem. We can expect an NFSv4 client to have one of these per server. Could use s_dev from nfs_server for a unique major/minor for each mount on the client, but these values won't be stable against a particular server export. Ben