Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3423593rdg; Tue, 17 Oct 2023 14:31:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNULkz4GpNujvQIZ8l6kTfgZr86G1e12IvQjQRV5qetIp/v4nA/anfYUPpXohxEgZPde7V X-Received: by 2002:a05:6e02:2184:b0:352:a405:fc1c with SMTP id j4-20020a056e02218400b00352a405fc1cmr4885979ila.17.1697578302847; Tue, 17 Oct 2023 14:31:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697578302; cv=none; d=google.com; s=arc-20160816; b=bjRk5l/cYZ6tVTF0uZiADPKXK7p9APD6H4oiHk9Zk7+1Zxg4QRxXVycC0sywOmV+O8 gvLFdUXHyZ1P19lvAhxRchVtQ/KcwV4Z/ps0/BKuBxLUAwv8+W2FVPEKGDBWjn2iIWDE l3YddpT/qrMdcriUU3mqxgz/JMOCMjqL9mRY3RxCid8w4/f4VCFE2z4wm+RK054VLVxh 1AuaSYSjhnVkSUYIp/RWQtntBreFt7DRJeyWCZaNesfSNRFKwfo1OiJE5//livofcLFu ro+S7zvw+67eG6EejKf80B/vZgg4iQzuQ+kyeyWg6599d6Bs/IEdx0toa1r0eH7kLWsy ythw== 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=S6rwuLgGOw1XplzAu3PdZeMUD0LBnyaUpt88UZUI6n0=; fh=kMe8ipV+H2zZMCwplNV8b/uzUHICYp+b9TeU6KoaKrQ=; b=Y6LfN37yDsefkdUmK4H/6ZwqtR31hmUepc0f7Zqt+Rxd8t6Lhzwkm9Msnf7RIvWuZo V4YteHgr7rmPZ21RYqpM0fNT73GAc1AN0efApUBTXbP69YdQZCl05EH1fZIJdQxWp+gi /3BfSNpeLbRsqqqesMhrho2li2X7L7XR++RCy/rJGGDs/MDrDiwsw8l/3Fk84uddWmRj VQE+4adJF2m4lkjPVUGMqb70Z67ovBqk119uONUx/lkv1H35G5DiPRlMeh2Do2HoaFLr JeN1KfhrrUNnIIfz9wrC3i9j9U1v9g9nMxBUfBjwO0PAy1JMmjPOdpKLUENRYKeIOX5Y 5UGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HbkzLQPH; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.36 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. [23.128.96.36]) by mx.google.com with ESMTPS id s29-20020a63925d000000b0056336fb99aasi613771pgn.850.2023.10.17.14.31.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 14:31:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HbkzLQPH; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.36 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 A8A928028430; Tue, 17 Oct 2023 14:31:37 -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 S1344006AbjJQVbg (ORCPT + 99 others); Tue, 17 Oct 2023 17:31:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344175AbjJQVbe (ORCPT ); Tue, 17 Oct 2023 17:31:34 -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 48563F1 for ; Tue, 17 Oct 2023 14:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697578248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=S6rwuLgGOw1XplzAu3PdZeMUD0LBnyaUpt88UZUI6n0=; b=HbkzLQPH11BznpbYEarI47/tbhYubf5wjXNHRuDLV9nNyFbwA1Sj44pbWyvkWThGJVk7Wi KatIsBRx0myRULFenmuyBe/h4XhdVmb9Noxr+iU3KuKErFS667SVYA4evmNZ678zsnCG01 BaXAxSQua5c9WS5fdCp/Jt/nL9ngrVo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-563-LMTSdzP2NMCaXkqoZAgeRw-1; Tue, 17 Oct 2023 17:30:45 -0400 X-MC-Unique: LMTSdzP2NMCaXkqoZAgeRw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 17AFA8E4143; Tue, 17 Oct 2023 21:30:45 +0000 (UTC) Received: from bcodding.csb.redhat.com (unknown [10.22.48.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD8DFC15BB8; Tue, 17 Oct 2023 21:30:44 +0000 (UTC) From: Benjamin Coddington To: trond.myklebust@hammerspace.com, anna@kernel.org Cc: linux-nfs@vger.kernel.org Subject: [PATCH 0/2] NFSv4 READDIR d_type fixup Date: Tue, 17 Oct 2023 17:30:42 -0400 Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 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=ham 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, 17 Oct 2023 14:31:37 -0700 (PDT) This is a combined posting of two previously posted patches. The first unconditionally adds the type attribute to the list of requested attributes for v4 READDIR. The second patch enables a per-mount modification via sysfs of any of the attributes the client will currently decode for v4 READDIR. The first patch solves a real problem but may cause a performance regression for some servers that require extra processing to return inode information along with the namespace. We performed an informal survey of most of the major NFSv4 server vendors and although we did not learn of any that may be impacted, the potential remains. The second patch gives us a way to disable this new READDIR behavior should we find a serious impact in an existing setup. I would appreciate serious consideration of this patch in light of the number of claimed performance regressions that have been reported almost every time we touch this sensitive operation on the client. For example: echo 0x800 0x800000 0x0 > /sys/fs/nfs/0\:57/v4_readdir_attrs .. will revert the behavior change from patch 1. Benjamin Coddington (2): NFSv4: Always ask for type with READDIR NFSv4: Allow per-mount tuning of READDIR attrs fs/nfs/client.c | 2 + fs/nfs/nfs4client.c | 4 ++ fs/nfs/nfs4proc.c | 1 + fs/nfs/nfs4xdr.c | 9 ++--- fs/nfs/sysfs.c | 81 +++++++++++++++++++++++++++++++++++++++ include/linux/nfs_fs_sb.h | 1 + include/linux/nfs_xdr.h | 1 + 7 files changed, 94 insertions(+), 5 deletions(-) -- 2.41.0