Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp853915pxb; Fri, 22 Jan 2021 00:23:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoQ+dUJSB5xWQllTtflcXtJOXNjP1w+FbamJMEXEXuwRtURcchNlss7r5uTusua+jES/ph X-Received: by 2002:a17:906:6087:: with SMTP id t7mr2290035ejj.90.1611303814101; Fri, 22 Jan 2021 00:23:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611303814; cv=none; d=google.com; s=arc-20160816; b=ELxLx/+aXYr6P2ZVWTuZx1i9jUGnxJyq9a30/M68Ss2iTFGauoZWJhxQfTI9qGfAvQ qtIWrL8V9zWP3JWwBsHls1pwIOA6bcVv4uMQTknk/JsWsySSySL+6kdQtV9J7WLYQdxM pf/rVSO1tuV/0NjfaRFKX6PlCsSUZvrfbAjQAoyij7HGosBMwtxZiDtnxS1eHhGtz45v ueeKjG/ffKjLMdLY5o60O4gMTp72BSHadJH2g3qKoyZZYCrvgbx8pmT0bBp7g0vrmgdT Sy8oWp7Hmqb7/wwA9nrGJ44kKsLUrr3HqTE9/r66eUqz8Pjv5sKsrk8hErdI+kzpVS1g QrOw== 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=7CD4ZZi1efsWWfKaFweeXsHDSTYWlbR5PIt/BwEj2Ko=; b=saXLmvGkNuFG+1VA5phLUrss/GlRBn3x5Wz+vdkmMsH4Jcum1W3jIdE+Yke2wxmjH3 SE2xnDpzEEudPXKINNBr+5Ixe03uKm7s/Dy8+AafgkOPcx3AEb0zfoI47Ocujk66Fr49 IcGBZNe6FO+rFryv3DbOJyIi6IuC9Uy8Kq/rcrB0ljzQBVx+Ef/eblbN3PythlLSewsR 3MuGkOMxesJPWHzGkVO4RMkk3AAYhEIXSoMcmhyCgyZM/RdtdKSMNzowvpy4AmZbc32z GEaWAylMO1twwS8bYnol+scQtCWxeaVs5E8fQ1c7Wwc5o1frTZL4TZ9dXFh4NatabP4s 1KYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ZkLsjDUE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca22si2719469ejb.112.2021.01.22.00.23.03; Fri, 22 Jan 2021 00:23:34 -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=@infradead.org header.s=casper.20170209 header.b=ZkLsjDUE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726059AbhAVIV5 (ORCPT + 99 others); Fri, 22 Jan 2021 03:21:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbhAVIV4 (ORCPT ); Fri, 22 Jan 2021 03:21:56 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B312C06174A; Fri, 22 Jan 2021 00:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=7CD4ZZi1efsWWfKaFweeXsHDSTYWlbR5PIt/BwEj2Ko=; b=ZkLsjDUEmLcYukb/nMYBE7JSZV A8nUGRdJ/5PTDyLFRpwFPIKGNUfL46FOFokRwR7du9q927Oob8IdfezCMVG9hQqbb4FsKgF10ugnT vSDBhFvQhxN5fuG+11D7f7USI/RwKt5m9r9S2thBbNp85FbQQPKFbcJHLoKeh0E2RZbd6YCHnRLIP Hvwj6DIW0ZNqaOEWbMKxRobuK3R5lhViw/tOZOyzzKmv05J35BSR3sb3EtLCbsKJpodGc+Ha1+9tg ozIWvE08QrwNQPx1YGPHgx52qnawGjW9+eFEU0qzXci6y6/jbFmx/aFpgM8z/1a+CWcsBHPhaGgCa nK7ZKOqg==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1l2rgh-000VNc-Py; Fri, 22 Jan 2021 08:21:03 +0000 Date: Fri, 22 Jan 2021 08:20:59 +0000 From: Christoph Hellwig To: "J. Bruce Fields" Cc: Christoph Hellwig , 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: <20210122082059.GA119852@infradead.org> References: <1611084297-27352-1-git-send-email-bfields@redhat.com> <1611084297-27352-3-git-send-email-bfields@redhat.com> <20210120084638.GA3678536@infradead.org> <20210121202756.GA13298@pick.fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210121202756.GA13298@pick.fieldses.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Jan 21, 2021 at 03:27:56PM -0500, J. Bruce Fields wrote: > > 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'd much prefer to just keep consulting the I_VERSION flag and only add the new op as an override for the NFS export. > > 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.) Even without the ctime i_version never goes backward, what is the problem here?