Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3389506pxb; Mon, 16 Nov 2020 13:20:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxSXx1nrEGvnYMLfokvTK8Y9yBFPNO/laz3Vt1ezZSHuUwpfbmj8puMwhqK4Ot8MbOAI2Yi X-Received: by 2002:a17:906:718f:: with SMTP id h15mr7107317ejk.243.1605561618497; Mon, 16 Nov 2020 13:20:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605561618; cv=none; d=google.com; s=arc-20160816; b=kljI4rL7lGRDBaLcL+NS2vgz7ckYD1n8N/jj0bqD+kgpxVkiAm+OBbod3syRsnKTJg bKPdKbgsKDQUeQjXrogSMQJz8MY/Zv+bGrMGEKJ2iLi2ybQo2456CmZqjhaikiQYqKew V04jy+Iyt96kUApaEcplexSeRP3PX3DK8GpnL7BbtEG0lxVs43lKmnQTVswj/8YS0bF1 WdeUz6SBDfRMhTG/RctoYx+5dMhSaVVM9W5kKfZmxzMI+C76qMy72GUCGCbhoHom65Yv IAinAyQicXXXd1VYwXuFa5Ek0QW5xdVX4+GzFBxrTmWb+6g2PEL50hfKFfUSbxNVayaG Il4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=JfbSd2O1sEM3qwZk+UW2+IwjzZ7P9kE7lio2owRBezY=; b=XI0TyP5CqiWEf6xUTGdZ7J207MjnZHGn9CmTdnhdMEgUnkq/+as2PjeV5SACoJA3sp +0OIKVkvVYwj4ZBDp5dcBvYxaMrj6kme7wqsllK5MGVrMyqSuDLvBcSd1o3TXBhqP0Yy 20nDnWkL8XSqBkfHuGwZeH6q231U4aErLoTz5iakbTASJgGDISeI09dMudkYSHUcyHAK cM1YupI9S9FAZCh9gRjelGjQKBB8vsbN5U6/mE1Ytu1Y4J5CVrbFlSZpD1mcJz8qg4ZQ 1nD0EQVY01ZG7mLbEWNrgzXYiMjdjy1Z8rvg6ezv8LcIOXNK3WUtv0XCvbwFa63/pC7X tWeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=xmPm1dg4; 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 i20si6033882eja.694.2020.11.16.13.19.45; Mon, 16 Nov 2020 13:20:18 -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=@fieldses.org header.s=default header.b=xmPm1dg4; 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 S1727711AbgKPTDh (ORCPT + 99 others); Mon, 16 Nov 2020 14:03:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727466AbgKPTDh (ORCPT ); Mon, 16 Nov 2020 14:03:37 -0500 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D025C0613CF for ; Mon, 16 Nov 2020 11:03:37 -0800 (PST) Received: by fieldses.org (Postfix, from userid 2815) id D627F1C15; Mon, 16 Nov 2020 14:03:36 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org D627F1C15 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1605553416; bh=JfbSd2O1sEM3qwZk+UW2+IwjzZ7P9kE7lio2owRBezY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xmPm1dg4ZehW/CXlPGsSFSTcNe/KSyDV27V8lHy73GwUlrag7/x12pQYchiC8ZRnV C0FH5jWKS0oNYDkTJi2uirMTaSeIBnbPRs47TX6a2w4JbHejpDZquICHSN65Ha3BLQ W3ZBrdJ8+obDHRqdvKhFXeVt4RdXJvDpRyk91BW4= Date: Mon, 16 Nov 2020 14:03:36 -0500 From: bfields To: Jeff Layton Cc: Daire Byrne , Trond Myklebust , linux-cachefs , linux-nfs Subject: Re: Adventures in NFS re-exporting Message-ID: <20201116190336.GH898@fieldses.org> References: <444227972.86442677.1605206025305.JavaMail.zimbra@dneg.com> <20201112205524.GI9243@fieldses.org> <883314904.86570901.1605222357023.JavaMail.zimbra@dneg.com> <20201113145050.GB1299@fieldses.org> <20201113222600.GC1299@fieldses.org> <20201116155619.GF898@fieldses.org> <83ebb6dc68216ce3f3dfd2a2736b7a301550efc5.camel@kernel.org> <20201116161407.GG898@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Mon, Nov 16, 2020 at 11:38:44AM -0500, Jeff Layton wrote: > Hmm, ok... nfsd4_change_attribute() is called from nfs4 code but also > nfs3 code as well. The v4 caller (encode_change) only calls it when > IS_I_VERSION is set, but the v3 callers don't seem to pay attention to > that. Weird. Looking back.... That goes back to the original patch adding support for ext4's i_version, c654b8a9cba6 "nfsd: support ext4 i_version". It's in nfs3xdr.c, but the fields it's filling in, fh_pre_change and fh_post_change, are only used in nfs4xdr.c. Maybe moving it someplace else (vfs.c?) would save some confusion. Anyway, yes, that should be checking SB_I_VERSION too. > I think the basic issue here is that we're trying to use SB_I_VERSION > for two different things. Its main purpose is to tell the kernel that > when it's updating the file times that it should also (possibly) > increment the i_version counter too. (Some of this is documented in > include/linux/iversion.h too, fwiw) > > nfsd needs a way to tell whether the field should be consulted at all. > For that we probably do need a different flag of some sort. Doing it at > the fstype level seems a bit wrong though -- v2/3 don't have a real > change attribute and it probably shouldn't be trusted when exporting > them. Oops, good point. I suppose simplest is just another SB_ flag. --b.