Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp749205pxk; Thu, 1 Oct 2020 12:52:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkqygnxLc2bXVOIKRswQpcvEqjXBPGfhOk7ZTmxaMjR7vbGN6/521IaPxIU1slB5/TrSVM X-Received: by 2002:a17:906:5490:: with SMTP id r16mr9462281ejo.222.1601581941669; Thu, 01 Oct 2020 12:52:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601581941; cv=none; d=google.com; s=arc-20160816; b=M/J+964Wf24qTI22Tp5Z0jSTFggvlISFMzL1T7H6R/AEk+DH2mb8wI0MswUmWh8+oK MkrIMCjxLLC8+ixhA8uO107IrF2wQqeVEtpd8K01M3OKuQsZAdwuEOUtm4igeQ4gX+Jh HFM3YGto1NCWA7U9I379eNGsj9dMWDeJ4b19k32aqE94X2auD1/2LwEIKKCpJ4yVXKYv RrpeQg0k1ZsAqdtUbNsYuCxn+ph7LwoU7pjx4Z/9vNGex5rnmoh+s7TzfvgWfELrRrOQ bNYRLxxXOv+eaBUag+nEprPiBdJoNVzAaq0F4xk8TP/qgeAtGZl4ICDw/7UuZrJGvOeU BOAQ== 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=NrdNo+ms9yfFZSEd7SU3wTffNGm9Nrj833RkKwqNb80=; b=mbPvuBjo+Ajf8z6D9FQMBYbQBILaGj4ihLihFujb6c5plWfh/xAsWfN5U9r01OBpan fFK733t/XgbmDrorA9PPQ0Gcqx1rj+92IsBHzGCnw66m8nhJAPP6wU06NZZAdw+FW0Of 08eOuKOT5XrkUCaTE4rNvWurOCJ0KtiR/rwkHb+2gHaKH4pk73jd8Iqk7WonbRUI57yg WAWR1QpzgP25ds0mMFWk/o/PdkvFLx0FIIBaXPwhkFQpmlJnPSh44Vkwep0b0h4qf8c/ Lyh8/spZ0cnIjQbh58CQhw5NvzJZRnuIhA8qO3lkIQB6sIIfsV8+xbu0cHIqZjbcjtq9 OuWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=e6Gva+lm; 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 d15si4454020ejr.178.2020.10.01.12.51.48; Thu, 01 Oct 2020 12:52:21 -0700 (PDT) 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=e6Gva+lm; 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 S1729990AbgJATvn (ORCPT + 99 others); Thu, 1 Oct 2020 15:51:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726671AbgJATvn (ORCPT ); Thu, 1 Oct 2020 15:51:43 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8D0AC0613D0 for ; Thu, 1 Oct 2020 12:51:42 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 085451BE7; Thu, 1 Oct 2020 15:51:42 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 085451BE7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1601581902; bh=NrdNo+ms9yfFZSEd7SU3wTffNGm9Nrj833RkKwqNb80=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e6Gva+lmnze3ld7h6tuJoGR0EmLZ/2/6voQMIp/mdjmdzJupQvuWs+0yPEccf+BEj 08b5nbEucZEpNK8KfuknBGHPOE/Oa/ZxIwlEXF24ljmR06aDEgT1BKgJhqXTJn/Tr0 UVcs53Pc4NVJvaA6Hzma5ULEnKWOsHPV5y/IgmwI= Date: Thu, 1 Oct 2020 15:51:42 -0400 From: "bfields@fieldses.org" To: Trond Myklebust Cc: "linux-cachefs@redhat.com" , "linux-nfs@vger.kernel.org" , "jlayton@kernel.org" , "daire@dneg.com" Subject: Re: [Linux-cachefs] Adventures in NFS re-exporting Message-ID: <20201001195142.GG1496@fieldses.org> References: <943482310.31162206.1599499860595.JavaMail.zimbra@dneg.com> <1155061727.42788071.1600777874179.JavaMail.zimbra@dneg.com> <97eff1ee2886c14bcd7972b17330f18ceacdef78.camel@kernel.org> <20201001184118.GE1496@fieldses.org> <1424d45ba1d140bfcff4ae834c70b0a79daa6807.camel@hammerspace.com> <20201001192602.GF1496@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 Thu, Oct 01, 2020 at 07:29:51PM +0000, Trond Myklebust wrote: > On Thu, 2020-10-01 at 15:26 -0400, bfields@fieldses.org wrote: > > On Thu, Oct 01, 2020 at 07:24:42PM +0000, Trond Myklebust wrote: > > > NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR should normally be good enough > > > to > > > allow the above optimisation, yes. I'm less sure about whether or > > > not > > > we are correct in returning NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR when > > > in > > > fact we are adding the ctime and filesystem-specific change > > > attribute, > > > but we could fix that too. > > > > Could you explain your concern? > > > > Same as before: that the ctime could cause the value to regress if > someone messes with the system time on the server. Yes, we do add in > the change attribute, but the value of ctime.tv_sec dominates by a > factor 2^30. Got it. I'd like to just tell people not to do that.... If we think it's too easy a mistake to make, I can think of other approaches, though filesystem assistance might be required: - Ideal would be just never to expose uncommitted change attributes to the client. Absent persistant RAM that could be terribly expensive. - It would help just to have any number that's guaranteed to increase after a boot. Of course, if would to go forward at least as reliably as the system time. We'd put it in the high bits of the on-disk i_version. (We'd rather not just mix it into the returned change attribute as we do with ctime, because that would cause clients to discard all their caches unnecessarily after boot.) --b.