Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2816940rda; Wed, 25 Oct 2023 13:12:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcG9vOJSs91GGjViiO23a1GLMzAp7RwY2F94xKwFTHidGnKm7kDxzcDpHZwm5+LLTOyU9F X-Received: by 2002:a0d:d6cd:0:b0:5a8:435d:8ca9 with SMTP id y196-20020a0dd6cd000000b005a8435d8ca9mr16884617ywd.25.1698264730638; Wed, 25 Oct 2023 13:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698264730; cv=none; d=google.com; s=arc-20160816; b=Zye9fE5fyVxjpwoHKduQQua1ZhZ0gyWAYosgJn/4njDZFvIx2TGQ0Q6fQZBK6st7x9 iPTFKPZriu7uE9S7InIQOF6L/xJAxIC48SiUfaCkCciynfk4AGi1s0jeSWfwmXHDnsx5 byTk6uMzFJoWrN59OQvFNEiuib05PjJ+0HfhMb29IcI2AizKuWSbxKvkoVGuutqT5NmQ v5rLKhsAFYOIRGUDifshat1+seE4vf624oQR1WINSAtByrUN1vUUV898Ozzrgh6F7LcU 26A6910wZR8TplFq6qNR/ChYiTlbHmFMdPOGNtYS5kEnzfle/S9Nwgoed7ShJWdHXnX2 Q4vw== 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=Mav3bfV//vVf2LGNO9I+R4QgrCE2H3bfrksrJq4AB2w=; fh=kMe8ipV+H2zZMCwplNV8b/uzUHICYp+b9TeU6KoaKrQ=; b=kf4IfnBW/KzGJ2ukbCVCgITj8icLd8p4WExQdXNQc9m9vSFZqWNUHm7ckL080DrysH BEBAzllIfQ+42/6qPpSUc7XGDLVvcFdQYoaJB0rdXbLsO8JbL4P0QhMovEQDOfLBAyLa St2qwMapTHbUlzLoZFFGt9mZZ6tn2zbAThRrRsjinwAZjH8BPusyq/iJ2tQjJ8AVFHRF fHra78AfSY+7R9vPv+hvJo/YRmM/d1CRAtEhKR+ETbSlc1N6rQcr9E7DnSl9t1r/ozwK rD0XLy/WDJ4d4W+mXX+QtVaVfrftJUy5H96USz6OqrWjivPji7zg3j16bn4f4QrFHejt fsDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ckCRvXJg; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id a11-20020a0dd80b000000b005a80f09948asi11987911ywe.131.2023.10.25.13.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 13:12:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ckCRvXJg; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 5BC69811F11C; Wed, 25 Oct 2023 13:12:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229695AbjJYUMG (ORCPT + 99 others); Wed, 25 Oct 2023 16:12:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjJYUMF (ORCPT ); Wed, 25 Oct 2023 16:12:05 -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 3EC58111 for ; Wed, 25 Oct 2023 13:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698264679; 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=Mav3bfV//vVf2LGNO9I+R4QgrCE2H3bfrksrJq4AB2w=; b=ckCRvXJgdCFWaYTP5HQtAADlwqsrcnducGUbqlTwL8eiNcqv/QUvekAzxhXgEaLLYxy+0S 982jsGLdybHRhOJCioJY9ACAiWa1fphNgMJSI/S8EkZxYU+wZv0MLvVwuIAe5GURlHr4U+ XBJelNZQnb1TW8al8tf8GLmWMK/XEFo= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-655-c4oPuCzTOEyB39dGKDmn2Q-1; Wed, 25 Oct 2023 16:11:16 -0400 X-MC-Unique: c4oPuCzTOEyB39dGKDmn2Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 904CF3C40C09; Wed, 25 Oct 2023 20:11:16 +0000 (UTC) Received: from bcodding.csb.redhat.com (unknown [10.22.50.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 327E61C060AE; Wed, 25 Oct 2023 20:11:15 +0000 (UTC) From: Benjamin Coddington To: trond.myklebust@hammerspace.com, anna@kernel.org Cc: linux-nfs@vger.kernel.org Subject: [PATCH v3 0/2] NFSv4 READDIR d_type fixup Date: Wed, 25 Oct 2023 16:11:13 -0400 Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham 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-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 25 Oct 2023 13:12:09 -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. Changes on v2: - fix patch 2/2 to compile without CONFIG_NFS_4 Changes on v3: - fix a lkp warning about line spacing - hide the v4_readdir_attrs behind CONFIG_NFS_EXPERT_SYSFS Benjamin Coddington (2): NFSv4: Always ask for type with READDIR NFSv4: Allow per-mount tuning of READDIR attrs fs/nfs/Kconfig | 7 +++ fs/nfs/client.c | 4 ++ fs/nfs/nfs4client.c | 4 ++ fs/nfs/nfs4proc.c | 1 + fs/nfs/nfs4xdr.c | 9 ++-- fs/nfs/sysfs.c | 91 +++++++++++++++++++++++++++++++++++++++ include/linux/nfs_fs_sb.h | 1 + include/linux/nfs_xdr.h | 1 + 8 files changed, 113 insertions(+), 5 deletions(-) -- 2.41.0