Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp328438pxu; Tue, 1 Dec 2020 12:16:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJybBA315P8xF+vcEQL+aU2ye/Gm/dMcKK56Tyq7lFwHovmDHxj/QfZKSeChlRg5tpa7HDOO X-Received: by 2002:a05:6402:318f:: with SMTP id di15mr1892241edb.237.1606853784019; Tue, 01 Dec 2020 12:16:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606853784; cv=none; d=google.com; s=arc-20160816; b=Hi1Ghou2b/laWHC/lpTsdLwhaZqVe1RvUf9qyKd2/V8YE798n7tSw+7CRz/8b1Gua2 OUqnH4RjnXu6q88ZK0pbwMZVpwelcENA7zQix0/FnS3dWLnZ8n5W6ehQALP4cnL30Tbr JYE846LEqLndEQsll8SqB7IwLEF5qY6kD4l5/VcQERbHUjPQ1/h9k6v5ixqO/skLAb1V CwfmUZLl3OSL3GbZTgSTB3L/pJ+pCwV+qfvdBjl6z5dd4QVijtwYvGp1NNELcH84QZ1Q 73nu7P0sKgJrxkp1rj9WAKy2TKbJlAKCINGAG7g9qxD3o9Dc3scK/6SrR5mhFFVoEtkE qfqw== 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=iCuMo3ocJT8KWB8iCG2PAQE+ovELEJBn86EQ2ZEB4nI=; b=OV36zx+pON0CTpvpAzhrpbN6IslEZImK30uumASl3rPdJr3H/FaNOPHve/SPHN6DRm KAyOY9pjcTyYWz9BnzhUIQloP8GCDYhmzHIppEUze4Ai8cMLsl8qfZ/WNLVjUhNSXKBd NHO7VcPfLKTm9TBD/8tP73Dc0DL/FMA+UNId0PZ8zIcJ3qdC5IaDUinp0cxpaB0t1Phs Ut/99pxhkskepbr/uvyDa3BIVR75Rt8JhTB7X0pVbeJqgt3ckszLoi4/FY/dPZg1abrN /bsCA9DNzWikeZjLvq27x4p8FGY2xSp8MYPbcJYBWS6Rsf5m+79Ng9HHIXA9nyMaYy3T VPBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="DvV/YnaI"; 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 dv16si619075ejb.153.2020.12.01.12.15.56; Tue, 01 Dec 2020 12:16: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="DvV/YnaI"; 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 S1730559AbgLAUOY (ORCPT + 99 others); Tue, 1 Dec 2020 15:14:24 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22854 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729845AbgLAUOY (ORCPT ); Tue, 1 Dec 2020 15:14:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606853577; 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=iCuMo3ocJT8KWB8iCG2PAQE+ovELEJBn86EQ2ZEB4nI=; b=DvV/YnaIZmflqwXIeH4mxqmjCtGK5lRbsy7MPaUyOJj3yClUfc5FEOae6H8B66+Bf3oQ11 4Fg0XIrgsDM6cXbG4lpJGIPxRGQtAB0EXvOBS7jcMhLCZoSbIGxOF0WDliZ93nswPQvrHY SVnvPLFOhKFErSxvynFzwSo39TJSAJg= 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-581-SsHaeEfIPYihXOmyeRb_3Q-1; Tue, 01 Dec 2020 15:12:53 -0500 X-MC-Unique: SsHaeEfIPYihXOmyeRb_3Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A0BF21005E45; Tue, 1 Dec 2020 20:12:52 +0000 (UTC) Received: from pick.fieldses.org (ovpn-116-43.rdu2.redhat.com [10.10.116.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7AA3D5D9CA; Tue, 1 Dec 2020 20:12:52 +0000 (UTC) Received: by pick.fieldses.org (Postfix, from userid 2815) id 2CDC61205B4; Tue, 1 Dec 2020 15:12:51 -0500 (EST) Date: Tue, 1 Dec 2020 15:12:51 -0500 From: "J. Bruce Fields" To: Jeff Layton Cc: "J. Bruce Fields" , Chuck Lever , linux-nfs@vger.kernel.org Subject: Re: [PATCH 1/5] nfsd: only call inode_query_iversion in the I_VERSION case Message-ID: <20201201201251.GZ259862@pick.fieldses.org> References: <1606776378-22381-1-git-send-email-bfields@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Dec 01, 2020 at 11:30:12AM -0500, Jeff Layton wrote: > On Mon, 2020-11-30 at 17:46 -0500, J. Bruce Fields wrote: > > From: "J. Bruce Fields" > > > > inode_query_iversion() can modify i_version. Depending on the exported > > filesystem, that may not be safe. For example, if you're re-exporting > > NFS, NFS stores the server's change attribute in i_version and does not > > expect it to be modified locally. This has been observed causing > > unnecessary cache invalidations. > > > > The way a filesystem indicates that it's OK to call > > inode_query_iverson() is by setting SB_I_VERSION. > > > > So, move the I_VERSION check out of encode_change(), where it's used > > only in FATTR responses, to nfsd4_changeattr(), which is also called for > > pre- and post- operation attributes. > > > > "only in FATTR responses, to nfsd4_change_attribute()," Whoops, and also FATTR should have been GETATTR. Fixed locally, I assume Chuck will just want to fix that up in his tree (let me know if not). --b.