Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp4012620rdg; Wed, 18 Oct 2023 12:09:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEE/YX18dhuq0JSwoviJh7vGpZL2hpPBQ7kYUmicnN02J/BSp3Z6/6qTzplodE/AWoOKl7T X-Received: by 2002:a05:6358:8416:b0:166:de88:6148 with SMTP id b22-20020a056358841600b00166de886148mr7113563rwk.1.1697656197939; Wed, 18 Oct 2023 12:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697656197; cv=none; d=google.com; s=arc-20160816; b=czdOF+JTBaVBER1eGdML+XphAwJ2N4QAkErF53GvFw2h+i97/VJlTMSTg43NHzLz7V bEvB9cihbXHZ3FrPp0IFQjx59wx5NU6yITiZY8v35rZ204ZXy0qGi/f3JdmNBInOX/jY 2LTAmQqQ+0czOcFt9qiptlfqREtRskP1jg/rkZscPQewlDhTdo9esR6dNT1648lAQJlr N/LNhGMsyqqPfUiZvwqN76coYNvoSavpLEk+5Hp6Coawx+Xhx8ZXV/KSmdsrzW/Utt8q CFcymDrWbmJpl05T1/bzhTXLz9I7SLJgxxgWEcwDQJMDJJgB4c1c+T1eOS24dcF6wmKt 3F+A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eJm2VOptx7PepimudTOmvz8Y1z9b6dN4O2gMGfDgu80=; fh=QbDzsCxcx6jm26ladOVOua4sU2Gn3OsENEkRphkHHLc=; b=uIdZpXShC694uL2xss7qhXRbxsPiDSHPMgxarTCXUC6Zk/VCEyd9P7JeXSt5ja1ecc LEb27hJg3O/rRJbWYTveN6DjuuXJKsDPjivlEcueW0zVlMe3KIQ0o83hJ1m84cONN2q5 lkWyD/ekdiPRG+Gh7hqhzTGa6m6S5ytda4WuZfTFBq2pJN1Vi+rPOASL259TrcCxT/8U vDDRQKyfD0THaLVwbHcgKnqZE9RAnGKYl1VXf8UP7KsIdiIXIoHdSVmFQYuHm1AWioni UXFbzDsQNZyEKCIipKk2P5D46xhQioSHuRB9PT4vsChYyW7POfcLy3aXM3t0fHf3af5E x/Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W2lltrHM; 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 y187-20020a638ac4000000b005ad9894a223si2680855pgd.326.2023.10.18.12.09.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 12:09:57 -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=W2lltrHM; 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 50DA48132A66; Wed, 18 Oct 2023 12:09:33 -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 S229947AbjJRTJd (ORCPT + 99 others); Wed, 18 Oct 2023 15:09:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbjJRTJc (ORCPT ); Wed, 18 Oct 2023 15:09:32 -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 774E0119 for ; Wed, 18 Oct 2023 12:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697656132; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eJm2VOptx7PepimudTOmvz8Y1z9b6dN4O2gMGfDgu80=; b=W2lltrHMj1QBdZfLEcQiH3yTAaKmY/nyBPNUohRATyYDs4lGFiz/hZLkLjvn/8NN75P8cC WjslZYcEeN6NivuTFYMTAD+v1r7Tng6eqggYxXYN9XxAReg20Br/wApqbVnyxKHMzGceCE 0avVoUOt9RwF78jSZ+QZ+u8f/ougEUQ= 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-227-wOYZ-rLQOMmR6BHWC3Nu4Q-1; Wed, 18 Oct 2023 15:08:48 -0400 X-MC-Unique: wOYZ-rLQOMmR6BHWC3Nu4Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 7760A881F01; Wed, 18 Oct 2023 19:08:47 +0000 (UTC) Received: from [192.168.37.1] (unknown [10.22.48.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6BFDF503E; Wed, 18 Oct 2023 19:08:46 +0000 (UTC) From: Benjamin Coddington To: Anna Schumaker Cc: Chuck Lever , Jeff Layton , trond.myklebust@hammerspace.com, linux-nfs@vger.kernel.org Subject: Re: [PATCH 2/2] NFSv4: Allow per-mount tuning of READDIR attrs Date: Wed, 18 Oct 2023 15:08:45 -0400 Message-ID: <828F5AC6-99CA-417A-9475-41B6B9F35DB1@redhat.com> In-Reply-To: References: <6157b73e380e5b625cd8ed0133ef392d0dd4bd8b.camel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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]); Wed, 18 Oct 2023 12:09:33 -0700 (PDT) On 18 Oct 2023, at 14:38, Anna Schumaker wrote: > On Wed, Oct 18, 2023 at 10:25 AM Chuck Lever wrote: >> >> On Wed, Oct 18, 2023 at 09:33:40AM -0400, Jeff Layton wrote: >>> On Wed, 2023-10-18 at 08:56 -0400, Chuck Lever wrote: >>>> On Tue, Oct 17, 2023 at 05:30:44PM -0400, Benjamin Coddington wrote: >>>>> Expose a per-mount knob in sysfs to set the READDIR requested attributes >>>>> for a non-plus READDIR request. >>>>> >>>>> For example: >>>>> >>>>> echo 0x800 0x800000 0x0 > /sys/fs/nfs/0\:57/v4_readdir_attrs >>>>> > > I understand why you're not adding a keyword for each attribute > requested in a readdir, but would it be possible to have a single > magic keyword like "reset" or "default" that is an alias for reverting > to the default attributes? Yes, it's possible. But what happens when we change the defaults again? "Reset" becomes meaningless after that. That sort of sysfs addition is not future-proof. This file both shows the current and any future default set of attributes being used on the client as well as allowing them to be modified. The only attributes that are allowed to be set are those that the client would already request and properly decode in the readdir plus path. The foot-shooty space is the permutation of every combination of those 20 attributes, save the three cases we've been stomping on already: 1) the non-plus case, 2) the new non-plus with type, and 3) the plus case with all 20 attributes. I suppose I could test all those cases for weirdness, but I expect they'd all "just work" for listing directories. (I have tested quite a few without surprises.) Perhaps some cases would expose assumptions in the attribute cache on the client -- for example the client might expect _SIZE and _SPACE_USED to always be updated in the same operation. But, I don't expect that to create devastating issues, and I really don't think anyone's going to need to break the client by trying to ask for only _SIZE without _SPACE_USED (all hypothetical). Another way forward may be to just allow the addition or removal of _TYPE, but the client I want to use allows me to request any of those attributes. If this never ends up helping anyone, I'll eat my hat. Ben