Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3681470rdg; Wed, 18 Oct 2023 03:00:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDUpiBKTQFBZT4BhvTQoDigum5CpIobXF6o8gQMXTAXylto+GpcVJfmgK2DqcYFi5kM/hp X-Received: by 2002:a17:903:28cd:b0:1ca:8252:a72 with SMTP id kv13-20020a17090328cd00b001ca82520a72mr4423185plb.63.1697623218736; Wed, 18 Oct 2023 03:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697623218; cv=none; d=google.com; s=arc-20160816; b=RTQCpg2I1EzFW7UZVjIdWWgzDnEgYQxWvJT36ThBGFBLE4xSg/GvWWt7/xGauaRoVD I5sK3e+1tlJu37MPGOOZs9PDG06lWxtHrd+idXFrYvtM9TmVE310qBewYN01PoKYX3Tl Bqah87Bk5n/NExi1kw/X9KUV1FmrmketaFaAx64K1/17EZ4mxN7mKGs1fUqp8GNIEZlR agVaJa+eHRhcxnbh4VHZM1ZUgW9VJ7U6tAX4AtS3DIOIWXVQWjaM0jTOLQhv+4nUUWsB brEIl1lApXCm1H2p10SYWZfOBqgGlO7Ct038DayVHpLThR3LV4UosnPWKAk15wUZyLsP IIwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fSUsPdrEDK7N4am6eycVRaEwUoir6ejGY8R+prw+wOs=; fh=+RsDa26EtFinitAHzEdIrc6gnUrGy2h3/tPcdrnXlys=; b=DNlYf0zK6cYczH0RkvtU5V5GURow7mWAuE3ki6Wd2sxzZNauR8/MQfyS6xzPH8W/wq 61cClqAEtZC2QJN7wukT9xcf9NOST5BH5l6GOnSC21N9pwxOSZGbc/hAKSmMUCcHcG57 1ZkjZQAYg2/1gOidMwjxVU13+/gDfqKaNBVBHPYRPSl/0Wlq0/k51Iraw75BwAk8KJkF Mx4lcgrIBDkolu5+6m1C20Y7PRo4qC8JyF1ZDyWHXLr9mkA1FDHQaM2kLUPI8cdLvt0t 1LAljsTx3TV0YdW4+/snLHm/xahUt/kl3heeucmbCuhy1k92NtfME8lT8dK/j38llpfP G5TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Vv9ycBMR; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id h12-20020a170902eecc00b001ca5a337339si3593383plb.627.2023.10.18.03.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 03:00:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Vv9ycBMR; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 38E3B8097296; Wed, 18 Oct 2023 03:00:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229537AbjJRKAJ (ORCPT + 99 others); Wed, 18 Oct 2023 06:00:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbjJRKAI (ORCPT ); Wed, 18 Oct 2023 06:00:08 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42E2DB0; Wed, 18 Oct 2023 03:00:07 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40838915cecso7654545e9.2; Wed, 18 Oct 2023 03:00:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697623206; x=1698228006; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=fSUsPdrEDK7N4am6eycVRaEwUoir6ejGY8R+prw+wOs=; b=Vv9ycBMRi2HRfGLsZWq64/lms3qJ/Sxf1AstZyJWcAdCFZRUQ1kLVwjvhqp5S0kOvt sO5A+O3TkPkiJ/z8PuBfurzMUK34CB6gUbfs7xKkARtJJmFAhfhz8ananZbiVyVwrwjS W8yy+WJPPK7zfRIabfMygI9S0B/UnjXjVHeHPJhDIhwttT0/0VOamyK4IZQIGS80I4Gp 7x7Ckx7ug3M5UT3RNmFhE58gNm0DPGbVqLgFXxj6/bFyIkDA7NXufx4EynC57MCCRYDM ZY7sLYrXtKaDmoU0m5r3RPz6CGULj9leW8f2GGaba4GprlUrePyryRAfOU0g+Z3SOyzH VFOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697623206; x=1698228006; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fSUsPdrEDK7N4am6eycVRaEwUoir6ejGY8R+prw+wOs=; b=M18LArjG65X2SMoUhosAimNv9pA64KNMjA+TcQhQY4uVeVOlR/dHeqWSB6KJybrUZA VR8+0KRtb5d3gPAWVpGTxUDUh8FXb/QiYODiP+76QzgckmZLqIFyFfEh+sMgfKWELcZZ OdCURRRAi5DdLLn3yU2T1C1UY008AFWh54L28P6klAySe5ZTRIVJ6PNKrq6MmuRPWDIn yu+127Hd9kjnqbO8bfR0/rsz2gVy4md1Nz75EFk88lZbuuqZ7XXAtFq9zpBqdn8MjpHF Sttk09UfDRBmG5FADr2iF3Jh5msbt9kZvDMtYP1Vu5Ro0REqO1TaxRPNILIzWAFGGb6r kDQw== X-Gm-Message-State: AOJu0YxF9GDWOrQmiXytfQVqffk9mNSRspQ5W5CP6HCKGg0OZcYDUYiX BytbJIQPsjCOBsztwCfMRsw= X-Received: by 2002:a05:600c:4f85:b0:405:3a14:aa1a with SMTP id n5-20020a05600c4f8500b004053a14aa1amr3892121wmq.18.1697623205352; Wed, 18 Oct 2023 03:00:05 -0700 (PDT) Received: from amir-ThinkPad-T480.lan ([5.29.249.86]) by smtp.gmail.com with ESMTPSA id y34-20020a05600c342200b004063977eccesm1222017wmp.42.2023.10.18.03.00.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 03:00:04 -0700 (PDT) From: Amir Goldstein To: Jan Kara Cc: Jeff Layton , Chuck Lever , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org Subject: [PATCH 0/5] Support more filesystems with FAN_REPORT_FID Date: Wed, 18 Oct 2023 12:59:55 +0300 Message-Id: <20231018100000.2453965-1-amir73il@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 fry.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 (fry.vger.email [0.0.0.0]); Wed, 18 Oct 2023 03:00:10 -0700 (PDT) Jan, Following up on the plan laid out in this discussion, this patch set implements the simpler and less controversial part of the plan to enable AT_HANDLE_FID for all filesystems. One filesystem that I tested which gained FAN_REPORT_FID support is 9p, but there are many other filesystem for whom fanotify will become mostly inotify drop-in replacement after this change. Since the main goal of this change is to progress fanotify towards being an inotify drop-in replacement, support for FAN_REPORT_FID with sb/mount mark is at lower priority. Because I think that support for FAN_REPORT_FID with sb/mount mark is controversial with non-decodeable (AT_HANDLE_FID) file handles, I have also disabled this feature that was added in v6.6-rc1 to ovelrayfs. If you agree to this retroactive change, the path #1 should be fast tracked into v6.6. The rest of the changes should probably go in via the vfs tree after review from you and nfsd maintainers. Thanks, Amir. [1] https://lore.kernel.org/r/20230920110429.f4wkfuls73pd55pv@quack3/ Amir Goldstein (5): fanotify: limit reporting of event with non-decodeable file handles exportfs: add helpers to check if filesystem can encode/decode file handles exportfs: make ->encode_fh() a mandatory method for NFS export exportfs: define FILEID_INO64_GEN* file handle types exportfs: support encoding non-decodeable file handles by default Documentation/filesystems/nfs/exporting.rst | 7 +-- Documentation/filesystems/porting.rst | 9 ++++ fs/affs/namei.c | 1 + fs/befs/linuxvfs.c | 1 + fs/efs/super.c | 1 + fs/erofs/super.c | 1 + fs/exportfs/expfs.c | 50 +++++++++++++++------ fs/ext2/super.c | 1 + fs/ext4/super.c | 1 + fs/f2fs/super.c | 1 + fs/fat/nfs.c | 1 + fs/fhandle.c | 6 +-- fs/fuse/inode.c | 7 +-- fs/jffs2/super.c | 1 + fs/jfs/super.c | 1 + fs/nfsd/export.c | 3 +- fs/notify/fanotify/fanotify_user.c | 25 +++++++---- fs/ntfs/namei.c | 1 + fs/ntfs3/super.c | 1 + fs/overlayfs/util.c | 2 +- fs/smb/client/export.c | 9 ++-- fs/squashfs/export.c | 1 + fs/ufs/super.c | 1 + include/linux/exportfs.h | 46 ++++++++++++++++++- 24 files changed, 133 insertions(+), 45 deletions(-) -- 2.34.1