Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp513585pxb; Thu, 21 Jan 2021 12:35:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzNgKD8RFnH97YLZYRNutliVu0jYAr7IWOQyFrW/cfMCu2IoZdqln7HF9KNjXqO3hh78ivI X-Received: by 2002:aa7:d0cf:: with SMTP id u15mr733754edo.115.1611261324554; Thu, 21 Jan 2021 12:35:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611261324; cv=none; d=google.com; s=arc-20160816; b=WolmBQiOf/xeUbRa/lM0nYBfZl8oeL13Vh+YuLLOyPR0oRP3UoCZ152ptS87MdgJau 0ryODlz+dJ3DyygvFdQDHvO8n60gK1J0gnLUY6o8wtTMJ19l5D3fhMLglpiy/GH4izl4 JMSuALVWQdgbuXQ8JYmEGtNmawlr5bjyfjM0SH6eZMhuk2nRor/sdrhamqLsfLBY7awz Y2HcODKoRKMdKtsqAacsVOlJo5pD0AhQ4wjGI+iJ9UJ0eZkP7mxuglHPPf+Yvn3TiBcI UavXhZLgfSmsONMPPQr/UOhRuPYDVofgfUtrz5ODyg27tnSiLx/gbPXbjhkXIBa2Wx1E x1ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZM6fDETjG/OSIznEV8j1/yCgekfI8hxlFIQEzJi1LHc=; b=vhZ48eGcT/fGkEsBHMj9V34bqsTRZiWdA4K/IVoeH86evYRV+/UqAzpU6eEEVCQ6i2 fir1fVXGyi7q2XmPAaga8lL8aENQQQIiOq5zf7CxdH+s8Nu3h7kLaQ/w+ZuEyDditNtc SbrAIpL45ZfaSIwxFLiWo602yD8FA71xCG/UmX4X63+8VYRMUm9+MpNisvyexIz5azFZ MnELtrHjsIrmlnB/n/zKHgnkihs0mm5JlwSj3lB3FZOhTQG+GsV70PlR8F8I5SHSEAgZ j6vQkpfbdaI5E7yijr2UPYslccRnupKG9HmffleCrj1zr1BxWekwMXKTGBq/3ciZ9dnM BgOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Cwk6zXEc; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e5si2791744edc.19.2021.01.21.12.34.58; Thu, 21 Jan 2021 12:35:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Cwk6zXEc; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726636AbhAUUeo (ORCPT + 99 others); Thu, 21 Jan 2021 15:34:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59767 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbhAUU3b (ORCPT ); Thu, 21 Jan 2021 15:29:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611260884; 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=ZM6fDETjG/OSIznEV8j1/yCgekfI8hxlFIQEzJi1LHc=; b=Cwk6zXEcThujaL0EnxTy045Xi2iSaBSszMNblW5Wjt0VsQtbxFRdCoF7717mfvAUnBRB1f K704aRoJtqT34ulucIvxmfMITc9sf+gxWYhzvI48+vCZIjkVX6HbjWFRtgeRjj9bJNTQ8h u4Qsab8M+9neOJsIhSc8X+S6D2br7+w= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-495-u041yri1OwCN7zre_Q3n-w-1; Thu, 21 Jan 2021 15:27:59 -0500 X-MC-Unique: u041yri1OwCN7zre_Q3n-w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2CD438066E5; Thu, 21 Jan 2021 20:27:58 +0000 (UTC) Received: from pick.fieldses.org (ovpn-121-75.rdu2.redhat.com [10.10.121.75]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 00A526EF45; Thu, 21 Jan 2021 20:27:57 +0000 (UTC) Received: by pick.fieldses.org (Postfix, from userid 2815) id D725B1204AB; Thu, 21 Jan 2021 15:27:56 -0500 (EST) Date: Thu, 21 Jan 2021 15:27:56 -0500 From: "J. Bruce Fields" To: Christoph Hellwig Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Trond Myklebust , Anna Schumaker , Chuck Lever Subject: Re: [PATCH 2/3] nfsd: move change attribute generation to filesystem Message-ID: <20210121202756.GA13298@pick.fieldses.org> References: <1611084297-27352-1-git-send-email-bfields@redhat.com> <1611084297-27352-3-git-send-email-bfields@redhat.com> <20210120084638.GA3678536@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210120084638.GA3678536@infradead.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Jan 20, 2021 at 08:46:38AM +0000, Christoph Hellwig wrote: > On Tue, Jan 19, 2021 at 02:24:56PM -0500, J. Bruce Fields wrote: > > From: "J. Bruce Fields" > > > > After this, only filesystems lacking change attribute support will leave > > the fetch_iversion export op NULL. > > > > This seems cleaner to me, and will allow some minor optimizations in the > > nfsd code. > > Another indirect call just to fetch the change attribute (which happens > a lot IIRC) does not seem very optimal to me. In the next patch we're removing an fh_getattr (vfs_getattr) in the case we call the new op, so that's typically a net decrease in indirect calls. Though maybe we could use a flag here and do without either. > And the fact that we need three duplicate implementations also is not > very nice. Ext4 and xfs are identical, btrfs is a little different since it doesn't consult I_VERSION. (And then there's nfs, which uses the origin server's i_version if it can.) I also have a vague idea that some filesystem-specific improvements might be possible. (E.g., if a filesystem had some kind of boot count in the superblock, maybe that would be a better way to prevent the change attribute from going backwards on reboot than the thing generic_fetch_iversion is currently doing with ctime. But I have no concrete plan there, maybe I'm dreaming.) --b.